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
This commit is contained in:
Nicolas Werner 2020-02-23 21:51:59 +01:00
parent 653ad0be97
commit 62b962cb44
1 changed files with 3 additions and 0 deletions

View File

@ -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.