send .fullyRead marker when leaving the room

This commit is contained in:
Mauro Romito
2025-06-09 10:36:39 +02:00
committed by Mauro
parent 7953cc44d7
commit dc5564f103
2 changed files with 25 additions and 0 deletions
@@ -122,6 +122,9 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
}
func stop() {
// When navigating away from the room, we need to mark the room as fully read.
// This does not affect the read receipts only the notification count.
Task { await roomProxy.markAsRead(receiptType: .fullyRead) }
// Work around QLPreviewController dismissal issues, see the InteractiveQuickLookModifier.
state.bindings.mediaPreviewViewModel = nil
}