@@ -20,14 +20,14 @@ final class HubMenuCoordinator: Coordinator {
2020
2121 private var notificationsSubscription : AnyCancellable ?
2222
23- private let willPresentReviewDetailsFromPushNotification : ( ) -> Void
23+ private let willPresentReviewDetailsFromPushNotification : ( ) async -> Void
2424
2525 init ( navigationController: UINavigationController ,
2626 pushNotificationsManager: PushNotesManager = ServiceLocator . pushNotesManager,
2727 storesManager: StoresManager = ServiceLocator . stores,
2828 noticePresenter: NoticePresenter = ServiceLocator . noticePresenter,
2929 switchStoreUseCase: SwitchStoreUseCaseProtocol ,
30- willPresentReviewDetailsFromPushNotification: @escaping ( ) -> Void ) {
30+ willPresentReviewDetailsFromPushNotification: @escaping ( ) async -> Void ) {
3131
3232 self . pushNotificationsManager = pushNotificationsManager
3333 self . storesManager = storesManager
@@ -37,7 +37,7 @@ final class HubMenuCoordinator: Coordinator {
3737 self . navigationController = navigationController
3838 }
3939
40- convenience init ( navigationController: UINavigationController , willPresentReviewDetailsFromPushNotification: @escaping ( ) -> Void ) {
40+ convenience init ( navigationController: UINavigationController , willPresentReviewDetailsFromPushNotification: @escaping ( ) async -> Void ) {
4141 let storesManager = ServiceLocator . stores
4242 self . init ( navigationController: navigationController,
4343 storesManager: storesManager,
@@ -94,13 +94,15 @@ final class HubMenuCoordinator: Coordinator {
9494 return
9595 }
9696
97- self . willPresentReviewDetailsFromPushNotification ( )
98- self . pushReviewDetailsViewController ( using: parcel)
97+ Task { @MainActor in
98+ await self . willPresentReviewDetailsFromPushNotification ( )
99+ self . pushReviewDetailsViewController ( using: parcel)
99100
100- if siteChanged {
101- let presenter = SwitchStoreNoticePresenter ( siteID: Int64 ( siteID) ,
102- noticePresenter: self . noticePresenter)
103- presenter. presentStoreSwitchedNoticeWhenSiteIsAvailable ( configuration: . switchingStores)
101+ if siteChanged {
102+ let presenter = SwitchStoreNoticePresenter ( siteID: Int64 ( siteID) ,
103+ noticePresenter: self . noticePresenter)
104+ presenter. presentStoreSwitchedNoticeWhenSiteIsAvailable ( configuration: . switchingStores)
105+ }
104106 }
105107 }
106108 }
0 commit comments