immich/mobile/lib
Thorsten Winkler d7f05d2510
fix(mobile): Deduplicate assets in person view timeline (#26723)
fix(mobile): deduplicate assets in person view timeline

Previously, assets with multiple face records for the same person (e.g.,
manual Digikam imports and Immich ML detections) appeared multiple times
in the person timeline. This was caused by an inner join on the
assetFaceEntity without proper deduplication.

This commit refactors the timeline queries to use a subquery approach
instead of joins and grouping. This ensures:

- _getPersonBucketAssets: Only unique assets are fetched, even if
  multiple face records exist for a single asset.
- _watchPersonBucket: Asset counts in timeline headers are accurate
  and represent unique assets.
- Performance: Database overhead is reduced by avoiding complex joins
  and explicit groupBy operations on large result sets.

Signed-off-by: thowdev <12428285+thowdev@users.noreply.github.com>
2026-05-09 01:53:18 +00:00
..
constants refactor: move theme config to metadata table (#28224) 2026-05-07 15:12:14 +00:00
domain refactor: move cleanup config to metadata table (#28225) 2026-05-07 11:27:06 -05:00
entities refactor: yeet old timeline (#27666) 2026-04-15 23:00:27 +05:30
extensions chore!: duration in milliseconds (#28003) 2026-04-30 09:44:27 -04:00
infrastructure fix(mobile): Deduplicate assets in person view timeline (#26723) 2026-05-09 01:53:18 +00:00
interfaces refactor(mobile): interfaces refactor (#19415) 2025-06-23 11:27:44 -05:00
mixins chore: flutter 3.29.1 (#16730) 2025-03-10 21:46:36 -05:00
models refactor: yeet old timeline (#27666) 2026-04-15 23:00:27 +05:30
pages refactor: move cleanup config to metadata table (#28225) 2026-05-07 11:27:06 -05:00
platform refactor(mobile): Migrate durationInSeconds to durationMs (#26615) 2026-04-20 23:28:11 -04:00
presentation fix(mobile): correct filter default and UI desync in similar photos search (#27516) 2026-05-07 15:22:35 +00:00
providers refactor: move cleanup config to metadata table (#28225) 2026-05-07 11:27:06 -05:00
repositories chore!: migrate album owner to album_user (#27467) 2026-04-22 16:52:23 +02:00
routing fix(mobile): clear local data on forced logout (#27957) 2026-04-21 15:52:00 -05:00
services refactor: move cleanup config to metadata table (#28225) 2026-05-07 11:27:06 -05:00
theme fix(mobile): mismatch between system and app color when using low-chroma system color scheme (#27282) 2026-03-27 09:21:43 -05:00
utils refactor: move cleanup config to metadata table (#28225) 2026-05-07 11:27:06 -05:00
widgets fix(mobile): mounted check before setState in album sync action (#28300) 2026-05-08 18:55:03 +00:00
main.dart fix(mobile): restore notification plugin init (#28284) 2026-05-08 10:45:52 +07:00
wm_executor.dart chore(mobile): minor dependency updates (#27949) 2026-04-19 11:56:39 -05:00