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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user