[PR #4568] [MERGED] fix(mobile): asset deletion state management #10424

Closed
opened 2026-02-05 14:21:42 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/4568
Author: @shenlong-tanwen
Created: 10/21/2023
Status: Merged
Merged: 10/25/2023
Merged by: @alextran1502

Base: mainHead: fix/mobile-asset-delete


📝 Commits (2)

  • c7934a6 fix(mobile): asset deletion state management
  • a4dd8c2 mobile: add cast for map and remove unnecessary toList

📊 Changes

3 files changed (+76 additions, -26 deletions)

View changed files

📝 mobile/lib/modules/trash/providers/trashed_asset.provider.dart (+6 -7)
📝 mobile/lib/shared/providers/asset.provider.dart (+62 -18)
📝 mobile/lib/shared/services/sync.service.dart (+8 -1)

📄 Description

Changed made in the PR

  • The previous handling removed local assets from DB even if the user denied the System prompt which is undesirable. This resulted in few different scenarios where the actual state of the asset is different from the one maintained in the DB.

    Few such cases:

    • User denied system prompt, but the asset is still removed from DB since remoteDeleted will not be empty
    • User accepts system prompt, but the deletion is soft. If we go to trash, the indicator would still display cloud with check mark whereas it should display cloud only indicator

    These are handled in the updated handling.

  • During sync, remote deleted asset details were not removed from ExifInfo table which is properly cleaned now.

  • Emptying trash removed local assets without asking a prompt. The state is now properly updated to mark them as not backed up instead.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/4568 **Author:** [@shenlong-tanwen](https://github.com/shenlong-tanwen) **Created:** 10/21/2023 **Status:** ✅ Merged **Merged:** 10/25/2023 **Merged by:** [@alextran1502](https://github.com/alextran1502) **Base:** `main` ← **Head:** `fix/mobile-asset-delete` --- ### 📝 Commits (2) - [`c7934a6`](https://github.com/immich-app/immich/commit/c7934a6556caf8f0dee7462530ababdecf05250f) fix(mobile): asset deletion state management - [`a4dd8c2`](https://github.com/immich-app/immich/commit/a4dd8c23fe0de267595bec91370b1f69e0999e47) mobile: add cast for map and remove unnecessary toList ### 📊 Changes **3 files changed** (+76 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `mobile/lib/modules/trash/providers/trashed_asset.provider.dart` (+6 -7) 📝 `mobile/lib/shared/providers/asset.provider.dart` (+62 -18) 📝 `mobile/lib/shared/services/sync.service.dart` (+8 -1) </details> ### 📄 Description #### Changed made in the PR - The previous handling removed local assets from DB even if the user denied the System prompt which is undesirable. This resulted in few different scenarios where the actual state of the asset is different from the one maintained in the DB. Few such cases: - User denied system prompt, but the asset is still removed from DB since `remoteDeleted` will not be empty - User accepts system prompt, but the deletion is soft. If we go to trash, the indicator would still display cloud with check mark whereas it should display cloud only indicator These are handled in the updated handling. - During sync, remote deleted asset details were not removed from `ExifInfo` table which is properly cleaned now. - Emptying trash removed local assets without asking a prompt. The state is now properly updated to mark them as not backed up instead. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 14:21:42 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#10424