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

[Lightbox] Set 2 as minimal allowed zoom level #6132

Merged
merged 2 commits into from
Nov 6, 2024
Merged

[Lightbox] Set 2 as minimal allowed zoom level #6132

merged 2 commits into from
Nov 6, 2024

Conversation

gaearon
Copy link
Collaborator

@gaearon gaearon commented Nov 6, 2024

If the image resolution is low, both iOS and Android lightboxes didn't let you pinch it at all, and double tap would zoom it out. This fixes the issue by ensuring the max zoom scale we pass to the scroll view is always positive. I set it to allow at least 2x magnification (for small images — for highres images it would magnify more, as before).

Test Plan

Try this post: https://bsky.app/profile/neoxperson.bsky.social/post/3kaxlxr5tv622

Previously, the lightbox would zoom out on double tap. Now it slightly zooms in (and pinching also works).

@arcalinea arcalinea temporarily deployed to min-zoom-2 - social-app PR #6132 November 6, 2024 20:14 — with Render Destroyed
Copy link

github-actions bot commented Nov 6, 2024

Old size New size Diff
8.11 MB 8.11 MB 0 B (0.00%)

@gaearon gaearon changed the title [Lightbox] Set 2 as minimal allowed zoom level on iOS [Lightbox] Set 2 as minimal allowed zoom level Nov 6, 2024
@arcalinea arcalinea temporarily deployed to min-zoom-2 - social-app PR #6132 November 6, 2024 20:24 — with Render Destroyed
@mozzius mozzius merged commit d666a2d into main Nov 6, 2024
6 checks passed
@mozzius mozzius deleted the min-zoom-2 branch November 6, 2024 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants