-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix an issue with blogging reminders prompt not being shown after publishing a new post #23930
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
Fix an issue with blogging reminders prompt not being shown after publishing a new post #23930
Conversation
c32185c to
57d2e02
Compare
| func discardUnsavedChangesAndUpdateGUI() { | ||
| let postDeleted = discardChanges() | ||
| dismissOrPopView(didSave: !postDeleted) | ||
| discardChanges() |
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.
The fact that we no longer need didSave simplified this quite a bit.
| comment: "Title of the set goals button in the Blogging Reminders Settings flow.") | ||
| private enum Strings { | ||
| static let introTitle = NSLocalizedString("bloggingRemindersPrompt.intro.title", value: "Blogging Reminders", comment: "Title of the Blogging Reminders Settings screen.") | ||
| static let introDescription = NSLocalizedString("bloggingRemindersPrompt.intro.details", value: "Set up your blogging reminders on days you want to post.", comment: "Description on the first screen of the Blogging Reminders Settings flow called aftet post publishing.") |
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.
There was no longer need for a separate path + I adopted l10n.
| // We need to grab the latest Post Reference, since it may have changed (ie. revision / user picked a | ||
| // new blog). | ||
| if changesSaved { | ||
| strongSelf.post = editor?.post as? Post |
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 is no longer how it works starting from 23.9. After publishing editor?.post as? Post points to a revision that gets deleted during publishing. self.post is sufficient now.
|
| App Name | WordPress Alpha |
|
| Configuration | Release-Alpha | |
| Build Number | pr23930-57d2e02 | |
| Version | 25.6 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | 57d2e02 | |
| App Center Build | WPiOS - One-Offs #11238 |
|
| App Name | Jetpack Alpha |
|
| Configuration | Release-Alpha | |
| Build Number | pr23930-57d2e02 | |
| Version | 25.6 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | 57d2e02 | |
| App Center Build | jetpack-installable-builds #10276 |


Fixes #18696. I also updated the localization to no longer say "while the post is publishing..." – it's guaranteed to be published by this point.
To test:
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2024-12-30.at.17.55.39.mp4
Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
PR submission checklist:
RELEASE-NOTES.txtif necessary.Testing checklist: