diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-03-23 10:37:00 +0100 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-03-25 22:35:23 +0100 |
commit | 94581d2a55853e91e117301b408446d9426ef8e6 (patch) | |
tree | 5ccc0ad5cdd66dafea65db0673e7265dfefc7d46 | |
parent | 10b5ab9e13c46f275c3b1e567fb6a6421b103e6e (diff) | |
download | libquotient-94581d2a55853e91e117301b408446d9426ef8e6.tar.gz libquotient-94581d2a55853e91e117301b408446d9426ef8e6.zip |
Update the cache for sure if unread counters were changed
Backport of #345.
-rw-r--r-- | lib/room.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/room.cpp b/lib/room.cpp index 77fbc2a5..43abc21d 100644 --- a/lib/room.cpp +++ b/lib/room.cpp @@ -1362,17 +1362,20 @@ void Room::updateData(SyncRoomData&& data, bool fromCache) { qCDebug(MAIN) << "Setting unread_count to" << data.unreadCount; d->unreadMessages = data.unreadCount; + roomChanges |= Change::UnreadNotifsChange; emit unreadMessagesChanged(this); } if( data.highlightCount != d->highlightCount ) { d->highlightCount = data.highlightCount; + roomChanges |= Change::UnreadNotifsChange; emit highlightCountChanged(this); } if( data.notificationCount != d->notificationCount ) { d->notificationCount = data.notificationCount; + roomChanges |= Change::UnreadNotifsChange; emit notificationCountChanged(this); } if (roomChanges != Change::NoChange) |