Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix delete from device behavior in local contexts

Prateek Sunal96dcb12dc8b2
diff --git a/mobile/apps/photos/lib/ui/actions/file/file_actions.dart b/mobile/apps/photos/lib/ui/actions/file/file_actions.dart
index 1aa4f3de26..fe6b9ecbe0 100644
--- a/mobile/apps/photos/lib/ui/actions/file/file_actions.dart
+++ b/mobile/apps/photos/lib/ui/actions/file/file_actions.dart
@@ -88,10 +88,11 @@ Future<void> showSingleFileDeleteSheet(
isInAlert: true,
onTap: () async {
await deleteFilesOnDeviceOnly(context, [file]);
- if (isLocalOnly) {
- if (onFileRemoved != null) {
- onFileRemoved(file);
- }
+ // Remove from viewer if:
+ // 1. File is local-only (no remote copy), OR
+ // 2. We're in a local-only context (device folder - file disappears from this view)
+ if (onFileRemoved != null && (isLocalOnly || isLocalOnlyContext)) {
+ onFileRemoved(file);
}
},
),