mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 07:33:52 +02:00
Fixed incorrect text in context menu item to cancel scheduled uploading.
This commit is contained in:
parent
3fe9c36d90
commit
d98212e8b3
1 changed files with 9 additions and 1 deletions
|
@ -559,7 +559,15 @@ bool AddDeleteMessageAction(
|
||||||
Ui::show(Box<DeleteMessagesBox>(item, suggestModerateActions));
|
Ui::show(Box<DeleteMessagesBox>(item, suggestModerateActions));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
menu->addAction(tr::lng_context_delete_msg(tr::now), callback);
|
const auto text = [&] {
|
||||||
|
if (const auto message = item->toHistoryMessage()) {
|
||||||
|
if (message->uploading()) {
|
||||||
|
return tr::lng_context_cancel_upload;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tr::lng_context_delete_msg;
|
||||||
|
}()(tr::now);
|
||||||
|
menu->addAction(text, callback);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue