Skip to content
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

When QuickLookUI is open, rotating device causes it to be dismissed #747

Closed
boscojwho opened this issue Nov 5, 2023 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@boscojwho
Copy link
Contributor

Describe the bug

Expected Behavior

  1. Open photo in Feed.
  2. Rotate device.
  3. QuickLookUI rotates photo.
  4. User continues interacting with QuickLookUI.

Actual Behavior

  1. Open photo in Feed.
  2. Rotate device.
  3. QuickLookUI sheet is dismissed.

To Reproduce
This happens when opening QuickLookUI from Feed view, but not Post view.

  • It doesn't happen if Feed isn't scrolled down past a few posts.

Mlem Information:
Latest public TestFlight build and latest dev build.

Additional Context

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2023-11-04.at.22.37.43.mp4
@boscojwho boscojwho added the bug Something isn't working label Nov 5, 2023
@boscojwho
Copy link
Contributor Author

This issue is caused by FeedView not respecting scroll position on device rotation.

  • Currently, QuickLookUI is presented as a fullscreen sheet on the CachedImage view that trigger its opening.
  • This view is associated with a cell in the FeedView.
  • On device rotation, FeedView's lazy v stack moves to a different scroll position, and causes the CachedImage view that presented the QuickLookUI to disappear.
  • Since the view that presented it disappeared, SwiftUI removes the fullscreen sheet QuickLookUI from view.

We can confirm this by presenting QuickLookUI on a parent view (i.e. FeedView):

  • Doing so resolves this bug.

I'm not proposing we move the sheet to a parent view (for now, at least).

@EricBAndrews
Copy link
Member

Closed in #756

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants