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

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 last_event_id = getLastMessageInfo(txn, room_id).event_id;
const auto localUser = utils::localUser().toStdString(); const auto localUser = utils::localUser().toStdString();
if (last_event_id.isEmpty())
return false;
txn.commit(); txn.commit();
// Retrieve all read receipts for that event. // Retrieve all read receipts for that event.