Skip to content

fix(mobile): correct filter default and UI desync in similar photos search#27516

Open
TheBestX11 wants to merge 3 commits intoimmich-app:mainfrom
TheBestX11:fix/view-similar-media-type
Open

fix(mobile): correct filter default and UI desync in similar photos search#27516
TheBestX11 wants to merge 3 commits intoimmich-app:mainfrom
TheBestX11:fix/view-similar-media-type

Conversation

@TheBestX11
Copy link
Copy Markdown

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:

  • 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.

Grammar
...

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: "View similar photos" on video defaults to images only and causes filter UI desync

2 participants