mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Removed Ui::show from classes that have pointer to Controller.
This commit is contained in:
@@ -540,14 +540,15 @@ void TopBar::performDelete() {
|
||||
if (items.empty()) {
|
||||
_cancelSelectionClicks.fire({});
|
||||
} else {
|
||||
const auto box = Ui::show(Box<DeleteMessagesBox>(
|
||||
auto box = Box<DeleteMessagesBox>(
|
||||
&_navigation->session(),
|
||||
std::move(items)));
|
||||
std::move(items));
|
||||
box->setDeleteConfirmedCallback([weak = Ui::MakeWeak(this)] {
|
||||
if (weak) {
|
||||
weak->_cancelSelectionClicks.fire({});
|
||||
}
|
||||
});
|
||||
_navigation->parentController()->show(std::move(box));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user