2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 22:46:10 +00:00

Move a lot of settings to Core::Settings.

This commit is contained in:
John Preston
2020-06-18 22:04:16 +04:00
parent 4d6cc58f0d
commit 83538675ce
112 changed files with 1761 additions and 1482 deletions

View File

@@ -264,14 +264,18 @@ bool MainWindow::hideNoQuit() {
}
if (Global::WorkMode().value() == dbiwmTrayOnly || Global::WorkMode().value() == dbiwmWindowAndTray) {
if (minimizeToTray()) {
Ui::showChatsList();
if (const auto controller = sessionController()) {
Ui::showChatsList(&controller->session());
}
return true;
}
} else if (Platform::IsMac()) {
closeWithoutDestroy();
controller().updateIsActiveBlur();
updateGlobalMenu();
Ui::showChatsList();
if (const auto controller = sessionController()) {
Ui::showChatsList(&controller->session());
}
return true;
}
return false;
@@ -529,7 +533,9 @@ void MainWindow::updateControlsGeometry() {
}
void MainWindow::updateUnreadCounter() {
if (!Global::started() || App::quitting()) return;
if (App::quitting()) {
return;
}
const auto counter = Core::App().unreadBadge();
_titleText = (counter > 0) ? qsl("Telegram (%1)").arg(counter) : qsl("Telegram");