fix(mobile): ignore trashed assets in album date range and sorting qu…#30175
fix(mobile): ignore trashed assets in album date range and sorting qu…#30175tech00exploere wants to merge 1 commit into
Conversation
|
Label error. Requires exactly 1 of: changelog:.*. Found: 📱mobile. A maintainer will add the required label. |
|
Hi! I looked into the issue and noticed that the server already excludes trashed assets from album summaries, while the mobile repository queries were still including them. My goal was to make the mobile behavior consistent with the web and server without changing the existing flow. I'd really appreciate it if you could review this approach. If there's a better place to handle this logic or if you think the implementation can be improved or simplified, I'd be happy to update the PR based on your suggestions. Thanks for taking a look! |
Description
Fixes #30031
the mobile app was still including trashed assets when calculating an album's date range and when sorting albums by the latest or oldest photo. This made the album information on mobile different from the web, where trashed assets are already ignored.
this change updates the album queries in
remote_album.repository.dartto filter out assets with a non-nulldeletedAtvalue. The existing query flow remains the same, with only the filtering condition added so that only active assets are considered.this keeps the mobile behavior consistent with the server and web while limiting the change to the affected repository queries.
How Has This Been Tested?
->created an album with multiple assets and moved the newest asset to the Trash.
->verified that the album date range and sorting update correctly.
->moved the oldest asset to the Trash and verified that the album date range updates correctly.
->restored the trashed asset and verified that the album information updates correctly.
->verified that albums with all assets in the Trash still load correctly.
->verified that trashed assets are not shown as active album assets.
Screenshots (if appropriate)
N/A
Checklist:
Please describe to which degree, if any, an LLM was used in creating this pull request.
I discussed the overall approach while investigating the issue. The implementation, testing, and final review were completed by me.