summary refs log tree commit diff
path: root/src/Cache.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-02-23 21:51:59 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2020-02-23 22:48:54 +0100
commit62b962cb44b410c2b7e1317488cf78a8c7cbcd81 (patch)
tree9f9559fa535806177c10b4cc7868e0b6ec13f8e8 /src/Cache.cpp
parentFix placeholder text being visible behind transparent avatars (diff)
downloadnheko-62b962cb44b410c2b7e1317488cf78a8c7cbcd81.tar.xz
Improve read status handling in room list
Only consider the room as unread, if there is a message in the room and
only consider message and sticker events as messages.

fixes #65
Diffstat (limited to '')
-rw-r--r--src/Cache.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Cache.cpp b/src/Cache.cpp

index caa3f1ec..1361606f 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp
@@ -918,6 +918,9 @@ Cache::calculateRoomReadStatus(const std::string &room_id) const auto last_event_id = getLastMessageInfo(txn, room_id).event_id; const auto localUser = utils::localUser().toStdString(); + if (last_event_id.isEmpty()) + return false; + txn.commit(); // Retrieve all read receipts for that event.