-
Notifications
You must be signed in to change notification settings - Fork 136
Activate: 1 day after trial expiration notification #9106
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
Conversation
|
You can test the changes on this Pull Request by downloading an installable build, or scanning this QR code: |
|
The first 7 commits here seem to match the commits on #9104. Do you maybe want this to target that PR's branch instead of trunk? |
…-1-day-after-notification
Generated by 🚫 dangerJS |
|
@hafizrahman Yes! :) |
| private fun proceedIfFreeMatchingSite(siteId: Long?): Result { | ||
| val site = selectedSite.get() | ||
| return if (site.isFreeTrial && site.siteId == siteId) { | ||
| Result.success() | ||
| } else { | ||
| cancelWork("Store plan upgraded or a different site. Cancelling work.") | ||
| } | ||
| } | ||
|
|
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.
I'm aware this is coming from another PR. And I don't think we need to change anything in this PR, but I still believe it would be useful to show this notifications even when the user has switched to a different site. As long as the original site is still free trial I think it's worth notifying the user they have expired free trial sites.
Anyway, is sort of a corner case and maybe the work involved to support this is not worth it. Just some food for thought.
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.
Yeah, I agree. Although we'd need to modify the message that would identify the other site and tapping on it would switch sites 🤷
|
Nicely done @0nko !! I came back from the future after 15 days and I can confirm notification is shown and works as expected! |
Fixes #9105, a subtask of #8999.
This PR schedules a notification 1 day after a trial expiration and when a user taps on it, the app's redirected to the plan upgrade webview. There is a precondition that's checked before a notification's displayed -- a site must be still in trial and the site ID must match the original site that was created.
To test:
To make the testing quicker, change the notification delay units to seconds here to see it sooner than after 15 days :)