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

Try to hangup current call when quitting the app.

This commit is contained in:
John Preston
2017-04-29 23:06:32 +03:00
parent 29fc69ebaa
commit e050e270fc
8 changed files with 92 additions and 32 deletions

View File

@@ -2463,25 +2463,13 @@ namespace {
if (auto mainwidget = main()) {
mainwidget->saveDraftToCloud();
}
if (auto apiwrap = api()) {
if (apiwrap->hasUnsavedDrafts()) {
apiwrap->saveDraftsToCloud();
return;
}
}
QCoreApplication::quit();
Messenger::QuitAttempt();
}
bool quitting() {
return _launchState != Launched;
}
void allDraftsSaved() {
if (quitting()) {
QCoreApplication::quit();
}
}
LaunchState launchState() {
return _launchState;
}