2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-04 16:45:12 +00:00

Count all accounts in Core::App().unreadBadge.

This commit is contained in:
John Preston
2020-06-18 15:17:58 +04:00
parent 357caf8007
commit 3a5ede534e
34 changed files with 255 additions and 175 deletions

View File

@@ -512,10 +512,6 @@ void Application::handleAppDeactivated() {
Ui::Tooltip::Hide();
}
void Application::call_handleUnreadCounterUpdate() {
Global::RefUnreadCounterUpdate().notify(true);
}
void Application::call_handleObservables() {
base::HandleObservables();
}
@@ -575,17 +571,15 @@ bool Application::exportPreventsQuit() {
}
int Application::unreadBadge() const {
if (const auto session = maybeActiveSession()) {
return session->data().unreadBadge();
}
return 0;
return accounts().unreadBadge();
}
bool Application::unreadBadgeMuted() const {
if (const auto session = maybeActiveSession()) {
return session->data().unreadBadgeMuted();
}
return false;
return accounts().unreadBadgeMuted();
}
rpl::producer<> Application::unreadBadgeChanges() const {
return accounts().unreadBadgeChanges();
}
bool Application::offerLegacyLangPackSwitch() const {