-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blaze: Navigate to campaign creation after tapping on local notifications #13968
Conversation
Generated by 🚫 Danger |
📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works as expected. 🚀
@@ -20,6 +20,7 @@ final class DefaultBlazeLocalNotificationScheduler: BlazeLocalNotificationSchedu | |||
private let pushNotesManager: PushNotesManager | |||
private var subscriptions: Set<AnyCancellable> = [] | |||
private let blazeEligibilityChecker: BlazeEligibilityCheckerProtocol | |||
private var switchStoreUseCase: SwitchStoreUseCaseProtocol? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: It might be worth injecting this in init to unit test that the store switch happens before navigating to campaign creation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selanthiraiyan I injected the use case and added a unit test in 44af79d. Let me know if this matches your expectations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Thanks, Huong!
This reverts commit 7e98ca5.
Closes: #13935
Description
This PR handles the navigation to campaign creation upon tapping on local notifications for no Blaze campaign reminders. The site ID was restored for the user info of the notifications and is used to handle store switching and checking for eligibility.
Changes compared to the original PR #13944:
scheduleLocalNotificationIfNeeded
was renamed to clarify the notification type.Thanks to the change in #13950, the handle of taps on local notification should now work even when the app is not running.
Steps to reproduce
Testing information
Tested on iPhone 12 Pro iOS 17.6.1 and confirmed that tapping on both no campaign reminders and abandoned campaign creation navigate to the campaign creation flow.
Screenshots
RPReplay_Final1726541423.mov
RELEASE-NOTES.txt
if necessary.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: