fix(mobile): correct filter default and UI desync in similar photos search#27516
Open
TheBestX11 wants to merge 3 commits intoimmich-app:mainfrom
Open
fix(mobile): correct filter default and UI desync in similar photos search#27516TheBestX11 wants to merge 3 commits intoimmich-app:mainfrom
TheBestX11 wants to merge 3 commits intoimmich-app:mainfrom
Conversation
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
When you tap "View similar photos" on a video, the search filter is hardcoded to AssetType.image so you only get images back. Changing it to AssetType.other (no filter) matches what the web already does, which just passes the asset ID with no type restriction.
While fixing this I also noticed that when any pre-filter is applied (e.g. tapping "view similar"), the filter chip labels weren't being reset to match the new filter state. So if you had "Images" selected, triggered "view similar", the results would be correct but the chip would still show "Images". This affected all chips, not just media type. The fix resets all chip labels when a pre-filter is applied.
Fixes #27460.
How Has This Been Tested?
Opened a video, tapped "View similar photos", confirmed results include both photos and videos with no type filter applied
Triggered "view similar" multiple times in a row, confirmed the filter chips reset correctly each time instead of showing a stale value from the previous search
Confirmed normal filter chip interactions are unaffected
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.
Grammar
...