Skip to content

fix(mobile): refresh asset stack after deleting viewer item#28164

Open
PeterOmbodi wants to merge 1 commit intoimmich-app:mainfrom
PeterOmbodi:fix/refresh_stack_after_delete
Open

fix(mobile): refresh asset stack after deleting viewer item#28164
PeterOmbodi wants to merge 1 commit intoimmich-app:mainfrom
PeterOmbodi:fix/refresh_stack_after_delete

Conversation

@PeterOmbodi
Copy link
Copy Markdown
Contributor

Description

Currently, deleting any asset from a stack while viewing it causes the asset viewer to navigate to the next asset outside of the stack. This can be confusing because the user is still working within a stack context, but the viewer unexpectedly leaves that stack after deleting only one stack member.

This change makes the viewer stay in the current stack when possible after deleting a stacked asset. After deletion, the viewer selects the next asset at the same stack index, or the previous asset if the deleted item was the last one. The viewer only falls back to navigating outside the stack when there are no remaining stack members to show.

Note: the full behavior of this fix depends on the changes from PR #28141 being merged. Without those changes, deleting the first asset in a stack can cause the whole stack to disappear from the timeline, and other deleted stack items may reappear as not deleted after the view refreshes.

Fixes # (issue)
Related to #28141

How Has This Been Tested?

  • Manually tested deleting a stacked asset from the asset viewer and verified the viewer stays in the stack when remaining stack members exist
  • Manually tested deleting the last visible stack member and verified the viewer falls back to the existing next-asset behavior

Screenshots

Screen_recording_20260430_132948.mp4

Checklist:

  • I have carefully read CONTRIBUTING.md
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)

Please describe to which degree, if any, an LLM was used in creating this pull request.

An LLM was used to review chages and draft this PR description.

@immich-push-o-matic
Copy link
Copy Markdown

immich-push-o-matic Bot commented Apr 30, 2026

Label error. Requires exactly 1 of: changelog:.*. Found: 📱mobile. A maintainer will add the required label.

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.

1 participant