-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 posts shown embedded in the notifications popover #23889
Conversation
📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
|
readerViewController.coordinator?.notificationID = note.notificationId | ||
displayViewController(readerViewController) | ||
|
||
if isSidebarModeEnabled && splitViewController == nil { |
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 seems to be a roundabout way to check if the notifications view controller is displayed in a popover.
Maybe it's more intuitive to check whether self.modalPresentationStyle
or self.navigationController.modalPresentationStyle
is popover
?
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.
Yes, but after a quick search I couldn't find a reliable way to check if something is displayed in a popover. I guess the modalPresentationStyle
check could work in this case. I'm a bit reluctant to use it because it's only not a completely reliable indicator as on iPhone .popover
is displayed in a sheet by default (obviously not the case here for this screen).
Btw, I'll try to remove isSidebarModeEnabled
as well during these couple of weeks. It was added there as a temporary measure during the iPad rework and is a type of a feature flag.
4d9bb72
to
b0ecab1
Compare
Fixes #23883. New behavior on iPad:
Simulator.Screen.Recording.-.iPad.Pro.11-inch.M4.-.2024-12-12.at.09.51.42.mp4
Reader will now also no longer lose the current navigation state when opening a deep link with a post.
To test:
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.txt
if necessary.Testing checklist: