Skip to content

Commit 010953a

Browse files
authored
Merge pull request #7534 from woocommerce/fix/7318-cancel-all-local-notifs-on-login
Cancel all local notification cases on login success
2 parents 50ca34b + 2b822aa commit 010953a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

WooCommerce/Classes/Authentication/AuthenticationManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ extension AuthenticationManager: WordPressAuthenticatorDelegate {
341341
}
342342

343343
if ServiceLocator.featureFlagService.isFeatureFlagEnabled(.loginErrorNotifications) {
344-
ServiceLocator.pushNotesManager.cancelLocalNotification(scenarios: [.loginSiteAddressError])
344+
ServiceLocator.pushNotesManager.cancelLocalNotification(scenarios: LocalNotification.Scenario.allCases)
345345
}
346346

347347
let matcher = ULAccountMatcher(storageManager: storageManager)
@@ -496,7 +496,7 @@ private extension AuthenticationManager {
496496
}
497497

498498
if let notification = notification {
499-
ServiceLocator.pushNotesManager.cancelLocalNotification(scenarios: [notification.scenario])
499+
ServiceLocator.pushNotesManager.cancelLocalNotification(scenarios: LocalNotification.Scenario.allCases)
500500
ServiceLocator.pushNotesManager.requestLocalNotification(notification,
501501
// 24 hours from now.
502502
trigger: UNTimeIntervalNotificationTrigger(timeInterval: 86400, repeats: false))

0 commit comments

Comments
 (0)