Improve read marker

- Update from deprecated readMarkerEventId to lastFullyReadEventId for quotient 0.7.
- Removed duplicate code for marking read from the read marker delegate.
- Make sure that mark as read only trigger at the end of the timeline
- Allow the read marker to be highlighted when jumped to
This commit is contained in:
James Graham
2022-11-22 20:25:04 +00:00
parent eac2f30087
commit 7ce02ef0db
4 changed files with 34 additions and 47 deletions

View File

@@ -649,7 +649,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()) {
if (readMarkerRow > 0 && readMarkerRow < firstVisibleIndex() && messageListView.atYEnd) {
currentRoom.markAllMessagesAsRead()
}
}