mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Mark rooms as read on push and pop. (#462)
We don't have visibility into timeline item read status so can't do this continuously yet. * Simplify RoomTimelineProvider's responsibilities.
This commit is contained in:
@@ -29,6 +29,13 @@ struct RoomScreen: View {
|
||||
.overlay { loadingIndicator }
|
||||
.alert(item: $context.alertInfo) { $0.alert }
|
||||
.sheet(item: $context.debugInfo) { DebugScreen(info: $0) }
|
||||
.task {
|
||||
// Give a couple of seconds for items to load and to see them.
|
||||
try? await Task.sleep(for: .seconds(2))
|
||||
|
||||
guard !Task.isCancelled else { return }
|
||||
context.send(viewAction: .markRoomAsRead)
|
||||
}
|
||||
}
|
||||
|
||||
var timeline: some View {
|
||||
|
||||
Reference in New Issue
Block a user