File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -116,21 +116,11 @@ final class POSTabCoordinator {
116116 }
117117
118118 func onTabSelected( ) {
119- schedulePOSSurveyNotificationIfNeeded ( )
120119 presentPOSView ( siteID: siteID)
121120 }
122121}
123122
124123private extension POSTabCoordinator {
125- func schedulePOSSurveyNotificationIfNeeded( ) {
126- Task { @MainActor in
127- await POSNotificationScheduler ( ) . scheduleLocalNotificationIfEligible ( for: . currentMerchant)
128-
129- let action = AppSettingsAction . setHasPOSBeenOpenedAtLeastOnce { _ in }
130- storesManager. dispatch ( action)
131- }
132- }
133-
134124 func presentPOSView( siteID: Int64 ) {
135125 Task { @MainActor [ weak self] in
136126 guard let self else { return }
Original file line number Diff line number Diff line change @@ -65,6 +65,8 @@ final class AppCoordinator {
6565
6666 // Configures authenticator first in case `WordPressAuthenticator` is used in other `AppDelegate` launch events.
6767 configureAuthenticator ( )
68+
69+ schedulePOSSurveyNotificationIfNeeded ( )
6870 }
6971
7072 func start( ) {
@@ -101,6 +103,17 @@ final class AppCoordinator {
101103 }
102104}
103105
106+ private extension AppCoordinator {
107+ func schedulePOSSurveyNotificationIfNeeded( ) {
108+ Task { @MainActor in
109+ await POSNotificationScheduler ( stores: stores) . scheduleLocalNotificationIfEligible ( for: . currentMerchant)
110+
111+ let action = AppSettingsAction . setHasPOSBeenOpenedAtLeastOnce { _ in }
112+ stores. dispatch ( action)
113+ }
114+ }
115+ }
116+
104117private extension AppCoordinator {
105118 // Fetch latest site properties and update the default store if anything has changed:
106119 //
You can’t perform that action at this time.
0 commit comments