mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/telegramdesktop/tdesktop
synced 2026-09-20 08:03:45 +08:00
Don't schedule unread badge updates while quitting
This commit is contained in:
@@ -257,7 +257,7 @@ void Domain::updateUnreadBadge() {
|
||||
}
|
||||
|
||||
void Domain::scheduleUpdateUnreadBadge() {
|
||||
if (_unreadBadgeUpdateScheduled) {
|
||||
if (_unreadBadgeUpdateScheduled || Core::Quitting()) {
|
||||
return;
|
||||
}
|
||||
_unreadBadgeUpdateScheduled = true;
|
||||
@@ -362,9 +362,11 @@ void Domain::watchSession(not_null<Account*> account) {
|
||||
}) | rpl::on_next([=] {
|
||||
scheduleUpdateUnreadBadge();
|
||||
closeAccountWindows(account);
|
||||
crl::on_main(&Core::App(), [=] {
|
||||
removeRedundantAccounts();
|
||||
});
|
||||
if (!Core::Quitting()) {
|
||||
crl::on_main(&Core::App(), [=] {
|
||||
removeRedundantAccounts();
|
||||
});
|
||||
}
|
||||
}, account->lifetime());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user