mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Stop relying on the NotificationCenter for removing delivered push notifications:
- this will improve the architecture but more importantly will remove some very flakey unit tests
This commit is contained in:
committed by
Stefan Ceriu
parent
891315ef04
commit
4d513f9ed1
@@ -415,12 +415,7 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
||||
|
||||
private func sendReadReceiptIfNeeded(for lastVisibleItemID: TimelineItemIdentifier) async {
|
||||
guard application.applicationState == .active else { return }
|
||||
|
||||
// Clear any notifications from notification center.
|
||||
if lastVisibleItemID.timelineID == state.timelineViewState.timelineIDs.last {
|
||||
notificationCenter.post(name: .roomMarkedAsRead, object: roomProxy.id)
|
||||
}
|
||||
|
||||
|
||||
await timelineController.sendReadReceipt(for: lastVisibleItemID)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user