-
Notifications
You must be signed in to change notification settings - Fork 31
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 quicklook dismiss on rotate #756
Conversation
- Add QuickLookState to enable presentation from any view. - Pass quickLookState as env value in navigation destination so pushed views have access.
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 PR appears to break the "mark read on view image" functionality.
Repro:
- Tap an image in feed on an unread post
- Close the QuickLook preview
Expected behavior: post is marked read
Actual behavior: post is not marked read
Some very preliminary investigation indicates that the dismissCallback
is getting called 2-4 times per dismissal, though why that causes the post to not be marked read at all is a bit of a mystery
Ah, I thought that was just a simulator issue. Yeah, odd, because callback gets called. Will investigate. |
Self note: |
- Set isPresenting = false in error branch. - Don't observe quickLookState.url, no longer needed.
Resolved mark post as read issue:
|
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.
Nice 👍
Checklist
- When QuickLookUI is open, rotating device causes it to be dismissed #747 (reported via Lemmy community)
Pull Request Information
About this Pull Request
Screenshots and Videos
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2023-11-10.at.17.03.21.mp4
Additional Context
Rotation bug might not be reproducible in iOS simulator.