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): deletion of single assets #15597

Merged
merged 2 commits into from
Jan 24, 2025

Conversation

Saschl
Copy link
Contributor

@Saschl Saschl commented Jan 24, 2025

Fixes #14623

When deleting a picture, the app jumps to the next image, but the reference to the asset is not updated in currentAssetProvider (which is used by the delete functionality), but only after swiping to another image (onPageChanged callback). That means it will try to delete the same image again when hitting the delete button the next time.

Note: I'm not sure this is the right approach here, but I'm happy to take hints and will also look further, hence the draft

@Saschl Saschl force-pushed the fix/image-deletion branch from bd341e9 to de150d3 Compare January 24, 2025 14:17
@alextran1502 alextran1502 marked this pull request as ready for review January 24, 2025 17:45
Copy link
Contributor

@alextran1502 alextran1502 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@alextran1502 alextran1502 enabled auto-merge (squash) January 24, 2025 17:46
@alextran1502 alextran1502 merged commit 3c1fa22 into immich-app:main Jan 24, 2025
33 checks passed
@mertalev
Copy link
Contributor

Not setting the current asset in buildAsset was intentional. Swiping 1px to the right or left should not switch the current video to the other asset...

@Saschl
Copy link
Contributor Author

Saschl commented Jan 25, 2025

Not setting the current asset in buildAsset was intentional. Swiping 1px to the right or left should not switch the current video to the other asset...

Understood, this should be probably reverted then as it could cause other issues.

vladd11 pushed a commit to vladd11/immich that referenced this pull request Jan 25, 2025
fix: set asset in currentassetprovider on image load

Co-authored-by: Alex <[email protected]>
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.

IOS App skips to next picture on delete, but doesn't let you delete that one.
3 participants