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

fix(mobile): Fix iOS swipe not paging #6726

Closed
wants to merge 3 commits into from

Conversation

martyfuhry
Copy link
Contributor

The onPageChange function in the gallery was updating two watched ValueNotifiers which caused a race condition on iOS to not move the page every time. At least, this is our best approximation of what is happening.

image

The fix was to combine those two indices into a single watched object with a copyWith method to recreate it. I'm still able to reproduce the issue intermittently, so there may still be additional rebuilds caused by race conditions in the watched parameters.

@martyfuhry martyfuhry force-pushed the fix/ios-swipe-not-paging branch from 13c1de9 to a11bfe5 Compare February 5, 2024 03:34
Copy link

cloudflare-workers-and-pages bot commented Feb 5, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0152132
Status: ✅  Deploy successful!
Preview URL: https://1c3a9f3e.immich.pages.dev
Branch Preview URL: https://fix-ios-swipe-not-paging.immich.pages.dev

View logs

@martyfuhry
Copy link
Contributor Author

I just tested this against main and this branch has decidedly better swipe recognition. I'm not completely sure that this has solved the issue due to the difficulty in reproducing it, but I'm confident that this has absolutely fixed one major issue.

@alextran1502
Copy link
Contributor

I am still seeing the double swipe issue on my phone when the asset is remote + Local

@martyfuhry
Copy link
Contributor Author

Closing because this is fixed in #7016

@martyfuhry martyfuhry closed this Feb 13, 2024
@alextran1502 alextran1502 deleted the fix/ios-swipe-not-paging branch May 3, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants