2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +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

@@ -311,10 +311,6 @@ bool switchInlineBotButtonReceived(
return false;
}
void unreadCounterUpdated() {
Global::RefHandleUnreadCounterUpdate().call();
}
} // namespace Notify
#define DefineReadOnlyVar(Namespace, Type, Name) const Type &Name() { \
@@ -336,8 +332,6 @@ namespace Global {
namespace internal {
struct Data {
SingleQueuedInvokation HandleUnreadCounterUpdate = { [] { Core::App().call_handleUnreadCounterUpdate(); } };
Adaptive::WindowLayout AdaptiveWindowLayout = Adaptive::WindowLayout::Normal;
Adaptive::ChatLayout AdaptiveChatLayout = Adaptive::ChatLayout::Normal;
bool AdaptiveForWide = true;
@@ -348,16 +342,12 @@ struct Data {
bool ScreenIsLocked = false;
int32 DebugLoggingFlags = 0;
float64 RememberedSongVolume = kDefaultVolume;
float64 SongVolume = kDefaultVolume;
base::Observable<void> SongVolumeChanged;
float64 VideoVolume = kDefaultVolume;
base::Observable<void> VideoVolumeChanged;
HiddenPinnedMessagesMap HiddenPinnedMessages;
bool AskDownloadPath = false;
QString DownloadPath;
QByteArray DownloadPathBookmark;
@@ -388,7 +378,6 @@ struct Data {
base::Variable<DBIWorkMode> WorkMode = { dbiwmWindowAndTray };
base::Observable<void> UnreadCounterUpdate;
base::Observable<void> PeerChooseCancel;
QString CallOutputDeviceID = qsl("default");
@@ -418,8 +407,6 @@ void finish() {
GlobalData = nullptr;
}
DefineRefVar(Global, SingleQueuedInvokation, HandleUnreadCounterUpdate);
DefineVar(Global, Adaptive::WindowLayout, AdaptiveWindowLayout);
DefineVar(Global, Adaptive::ChatLayout, AdaptiveChatLayout);
DefineVar(Global, bool, AdaptiveForWide);
@@ -430,16 +417,12 @@ DefineVar(Global, bool, ModerateModeEnabled);
DefineVar(Global, bool, ScreenIsLocked);
DefineVar(Global, int32, DebugLoggingFlags);
DefineVar(Global, float64, RememberedSongVolume);
DefineVar(Global, float64, SongVolume);
DefineRefVar(Global, base::Observable<void>, SongVolumeChanged);
DefineVar(Global, float64, VideoVolume);
DefineRefVar(Global, base::Observable<void>, VideoVolumeChanged);
DefineVar(Global, HiddenPinnedMessagesMap, HiddenPinnedMessages);
DefineVar(Global, bool, AskDownloadPath);
DefineVar(Global, QString, DownloadPath);
DefineVar(Global, QByteArray, DownloadPathBookmark);
@@ -470,7 +453,6 @@ DefineRefVar(Global, base::Observable<void>, LocalPasscodeChanged);
DefineRefVar(Global, base::Variable<DBIWorkMode>, WorkMode);
DefineRefVar(Global, base::Observable<void>, UnreadCounterUpdate);
DefineRefVar(Global, base::Observable<void>, PeerChooseCancel);
DefineVar(Global, QString, CallOutputDeviceID);