Don't close calls log box after delete confirmation.
This commit is contained in:
parent
fa8dd61b02
commit
52000566cf
|
@ -873,10 +873,13 @@ void DeleteMessagesBox::deleteAndClear() {
|
|||
// deleteMessages can initiate closing of the current section,
|
||||
// which will cause this box to be destroyed.
|
||||
const auto session = _session;
|
||||
const auto weak = Ui::MakeWeak(this);
|
||||
|
||||
_session->data().histories().deleteMessages(_ids, revoke);
|
||||
session->data().histories().deleteMessages(_ids, revoke);
|
||||
|
||||
Ui::hideLayer();
|
||||
if (const auto strong = weak.data()) {
|
||||
strong->closeBox();
|
||||
}
|
||||
session->data().sendHistoryChangeNotifications();
|
||||
}
|
||||
|
||||
|
|
|
@ -355,7 +355,9 @@ base::unique_qptr<Ui::PopupMenu> BoxController::rowContextMenu(
|
|||
|
||||
auto result = base::make_unique_q<Ui::PopupMenu>(parent);
|
||||
result->addAction(tr::lng_context_delete_selected(tr::now), [=] {
|
||||
Ui::show(Box<DeleteMessagesBox>(session, base::duplicate(ids)));
|
||||
Ui::show(
|
||||
Box<DeleteMessagesBox>(session, base::duplicate(ids)),
|
||||
Ui::LayerOption::KeepOther);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue