fix(mobile): refresh asset stack after deleting viewer item#28164
Open
PeterOmbodi wants to merge 1 commit intoimmich-app:mainfrom
Open
fix(mobile): refresh asset stack after deleting viewer item#28164PeterOmbodi wants to merge 1 commit intoimmich-app:mainfrom
PeterOmbodi wants to merge 1 commit intoimmich-app:mainfrom
Conversation
|
Label error. Requires exactly 1 of: changelog:.*. Found: 📱mobile. A maintainer will add the required label. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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?
Screenshots
Screen_recording_20260430_132948.mp4
Checklist:
src/services/uses repositories implementations for database calls, filesystem operations, etc.src/repositories/is pretty basic/simple and does not have any immich specific logic (that belongs insrc/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.