mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 22:46:10 +00:00
Dialog styles moved from basic.style to dialogs.style.
Many minor design improvements in the new profiles. New drafts design in the dialogs list: no icon, red badge. Verified checkbox added to the new profile implementation. Drafts saving to cloud is delayed for 1 second when switching chats. Before quitting the app makes an attempt to save drafts (timeout 1.5s).
This commit is contained in:
@@ -2257,6 +2257,19 @@ namespace {
|
||||
if (quitting()) return;
|
||||
setLaunchState(QuitRequested);
|
||||
|
||||
if (auto window = wnd()) {
|
||||
window->hide();
|
||||
}
|
||||
if (auto mainwidget = main()) {
|
||||
mainwidget->saveDraftToCloud();
|
||||
}
|
||||
if (auto apiwrap = api()) {
|
||||
if (apiwrap->hasUnsavedDrafts()) {
|
||||
apiwrap->saveDraftsToCloud();
|
||||
QTimer::singleShot(SaveDraftBeforeQuitTimeout, Application::instance(), SLOT(quit()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
Application::quit();
|
||||
}
|
||||
|
||||
@@ -2264,6 +2277,12 @@ namespace {
|
||||
return _launchState != Launched;
|
||||
}
|
||||
|
||||
void allDraftsSaved() {
|
||||
if (quitting()) {
|
||||
Application::quit();
|
||||
}
|
||||
}
|
||||
|
||||
LaunchState launchState() {
|
||||
return _launchState;
|
||||
}
|
||||
|
Reference in New Issue
Block a user