mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-31 15:59:54 +00:00
Fix setting offline on quit.
This commit is contained in:
parent
769923c6cc
commit
c66b2b2291
@ -1047,7 +1047,7 @@ void Application::preventWindowActivation() {
|
||||
void Application::QuitAttempt() {
|
||||
auto prevents = false;
|
||||
if (AuthSession::Exists() && !Sandbox::Instance().isSavingSession()) {
|
||||
if (auto mainwidget = App::main()) {
|
||||
if (const auto mainwidget = App::main()) {
|
||||
if (mainwidget->isQuitPrevent()) {
|
||||
prevents = true;
|
||||
}
|
||||
|
@ -3752,7 +3752,7 @@ void MainWidget::updateOnline(bool gotOtherOffline) {
|
||||
if (this != App::main()) return;
|
||||
InvokeQueued(this, [=] { session().checkAutoLock(); });
|
||||
|
||||
bool isOnline = App::wnd()->isActive();
|
||||
bool isOnline = !App::quitting() && App::wnd()->isActive();
|
||||
int updateIn = Global::OnlineUpdatePeriod();
|
||||
if (isOnline) {
|
||||
auto idle = psIdleTime();
|
||||
|
Loading…
Reference in New Issue
Block a user