Allow read marker to be cleared when at 0 in Timeline

The read marker can be at posiiton 0 in the timeline so make sure that can be cleared by checking >=0 in markReadIfVisible
This commit is contained in:
James Graham
2023-02-26 09:20:15 +00:00
parent 8d47e58861
commit cc8bf79a9b

View File

@@ -661,7 +661,7 @@ Kirigami.ScrollablePage {
// Mark all messages as read if all unread messages are visible to the user
function markReadIfVisible() {
let readMarkerRow = eventToIndex(currentRoom.readMarkerEventId)
if (readMarkerRow > 0 && readMarkerRow < firstVisibleIndex() && messageListView.atYEnd) {
if (readMarkerRow >= 0 && readMarkerRow < firstVisibleIndex() && messageListView.atYEnd) {
currentRoom.markAllMessagesAsRead()
}
}