2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Moved showLogoutConfirmation from MainWindow to Window::Controller.

This commit is contained in:
23rd
2021-02-03 05:49:26 +03:00
committed by John Preston
parent 1f80c297ec
commit b4af805521
8 changed files with 51 additions and 45 deletions

View File

@@ -942,10 +942,13 @@ void MainWindow::createGlobalMenu() {
auto file = psMainMenu->addMenu(tr::lng_mac_menu_file(tr::now));
psLogout = file->addAction(tr::lng_mac_menu_logout(tr::now));
connect(psLogout, &QAction::triggered, psLogout, [] {
if (App::wnd()) App::wnd()->showLogoutConfirmation();
});
psLogout = file->addAction(
tr::lng_mac_menu_logout(tr::now),
this,
[=] {
ensureWindowShown();
controller().showLogoutConfirmation();
});
auto quit = file->addAction(
tr::lng_mac_menu_quit_telegram(tr::now, lt_telegram, qsl("Telegram")),