mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Removed Ui::show from classes that have pointer to Controller.
This commit is contained in:
@@ -131,7 +131,7 @@ void ShowCallsBox(not_null<Window::SessionController*> window) {
|
||||
return true;
|
||||
});
|
||||
};
|
||||
Ui::show(Box<PeerListBox>(std::move(controller), initBox));
|
||||
window->show(Box<PeerListBox>(std::move(controller), initBox));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -617,7 +617,11 @@ MainMenu::MainMenu(
|
||||
_telegram->setLinksTrusted();
|
||||
_version->setRichText(textcmdLink(1, tr::lng_settings_current_version(tr::now, lt_version, currentVersionText())) + QChar(' ') + QChar(8211) + QChar(' ') + textcmdLink(2, tr::lng_menu_about(tr::now)));
|
||||
_version->setLink(1, std::make_shared<UrlClickHandler>(Core::App().changelogLink()));
|
||||
_version->setLink(2, std::make_shared<LambdaClickHandler>([] { Ui::show(Box<AboutBox>()); }));
|
||||
_version->setLink(
|
||||
2,
|
||||
std::make_shared<LambdaClickHandler>([=] {
|
||||
controller->show(Box<AboutBox>());
|
||||
}));
|
||||
|
||||
_controller->session().downloaderTaskFinished(
|
||||
) | rpl::start_with_next([=] {
|
||||
@@ -903,7 +907,7 @@ void MainMenu::refreshMenu() {
|
||||
controller->showNewChannel();
|
||||
}, &st::mainMenuNewChannel, &st::mainMenuNewChannelOver);
|
||||
_menu->addAction(tr::lng_menu_contacts(tr::now), [=] {
|
||||
Ui::show(PrepareContactsBox(controller));
|
||||
controller->show(PrepareContactsBox(controller));
|
||||
}, &st::mainMenuContacts, &st::mainMenuContactsOver);
|
||||
if (_controller->session().serverConfig().phoneCallsEnabled.current()) {
|
||||
_menu->addAction(tr::lng_menu_calls(tr::now), [=] {
|
||||
@@ -938,7 +942,7 @@ void MainMenu::refreshMenu() {
|
||||
|
||||
auto nightCallback = [=] {
|
||||
if (Window::Theme::Background()->editingTheme()) {
|
||||
Ui::show(Box<InformBox>(
|
||||
controller->show(Box<InformBox>(
|
||||
tr::lng_theme_editor_cant_change_theme(tr::now)));
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user