fix(android): dedupe duplicate shadowed entries in exclusions timeline #1381
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/exclusions-shadow-dedup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug (0.10.9, user device): "Nicht in Memories" showed 18 entries for 6 images — the device held each image 3x (byte-identical copies → 3 state rows with distinct mediaStoreIds, same contentHash, all permanently_deleted), and rebuildSections mapped each shadowed row to its own ServerRemovedEntry.
Fix: shadowed rows now group by (contentHash, serverLifecycleState) into ONE entry per image.
Tests: ExclusionsViewModelTest extended with 4 cases (3 identical purged copies → ONE entry copies=3 no restore; trashed pair → TWO intents; mixed lifecycle same hash → two entries, copies summing to 3; null-hash rows stay unmerged). All 16 existing tests untouched and green.
Validation: rtk ./gradlew :app:testDebugUnitTest :core:test — app 703 tests / 64 classes, core 172 tests / 13 classes, 0 failures.
KNOWN_ISSUES: ISSUE-205 med/resolved/area:android.