Disabled auto-closing section of scheduled messages after 'Send Now'.

This commit is contained in:
23rd 2021-07-20 18:48:53 +03:00 committed by John Preston
parent 3dc73417e9
commit a6dbcdad54
2 changed files with 7 additions and 6 deletions

View File

@ -420,16 +420,12 @@ bool AddSendNowMessageAction(
const auto itemId = item->fullId();
menu->addAction(tr::lng_context_send_now_msg(tr::now), [=] {
if (const auto item = owner->message(itemId)) {
const auto callback = [=] {
request.navigation->showBackFromStack();
};
Window::ShowSendNowMessagesBox(
request.navigation,
item->history(),
(asGroup
? owner->itemOrItsGroup(item)
: MessageIdsList{ 1, itemId }),
callback);
: MessageIdsList{ 1, itemId }));
}
});
return true;

View File

@ -3004,11 +3004,16 @@ void ConfirmSendNowSelectedItems(not_null<ListWidget*> widget) {
if (!history) {
return;
}
const auto clearSelection = [weak = Ui::MakeWeak(widget)] {
if (const auto strong = weak.data()) {
strong->cancelSelection();
}
};
Window::ShowSendNowMessagesBox(
navigation,
history,
widget->getSelectedIds(),
[=] { navigation->showBackFromStack(); });
clearSelection);
}
QString WrapBotCommandInChat(