1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-09 08:42:50 +03:00

Fix Mark all as read in settings (#12205)

* Fix `Mark all as read` in settings

* Update tests
This commit is contained in:
Florian Duros
2024-02-01 18:58:57 +01:00
committed by GitHub
parent 40ee1bb400
commit 8299abd344
6 changed files with 16 additions and 11 deletions

View File

@@ -74,6 +74,9 @@ export function doesRoomHaveUnreadMessages(room: Room, includeThreads: boolean):
}
function doesTimelineHaveUnreadMessages(room: Room, timeline: Array<MatrixEvent>): boolean {
// The room is a space, let's ignore it
if (room.isSpaceRoom()) return false;
const myUserId = room.client.getSafeUserId();
const latestImportantEventId = findLatestImportantEvent(room.client, timeline)?.getId();
if (latestImportantEventId) {