mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:12: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
@@ -32,6 +32,7 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
|
||||
private let bugReportService: BugReportServiceProtocol
|
||||
private let appSettings: AppSettings
|
||||
private let analytics: AnalyticsService
|
||||
private let notificationManager: NotificationManagerProtocol
|
||||
|
||||
private let stateMachine: UserSessionFlowCoordinatorStateMachine
|
||||
|
||||
@@ -82,6 +83,7 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
|
||||
self.roomTimelineControllerFactory = roomTimelineControllerFactory
|
||||
self.appSettings = appSettings
|
||||
self.analytics = analytics
|
||||
self.notificationManager = notificationManager
|
||||
|
||||
navigationSplitCoordinator = NavigationSplitCoordinator(placeholderCoordinator: PlaceholderScreenCoordinator())
|
||||
|
||||
@@ -467,7 +469,9 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
|
||||
}
|
||||
|
||||
Task {
|
||||
await userSession.clientProxy.trackRecentlyVisitedRoom(roomID)
|
||||
let _ = await userSession.clientProxy.trackRecentlyVisitedRoom(roomID)
|
||||
|
||||
await notificationManager.removeDeliveredMessageNotifications(for: roomID)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -527,6 +531,10 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol {
|
||||
sidebarNavigationStackCoordinator.push(coordinator, animated: animated) { [weak self] in
|
||||
self?.stateMachine.processEvent(.dismissedInvitesScreen)
|
||||
}
|
||||
|
||||
Task {
|
||||
await notificationManager.removeDeliveredInviteNotifications()
|
||||
}
|
||||
}
|
||||
|
||||
private func dismissInvitesList(animated: Bool) {
|
||||
|
||||
Reference in New Issue
Block a user