Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fix stale localID not being nulled in download flow

ashilkn324b19f82c85
diff --git a/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart b/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart
index 5400e7b842..692a5842e3 100644
--- a/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart
@@ -1118,7 +1118,7 @@ class _FileSelectionActionsWidgetState
continue;
}
filesToDownload.add(
- file.isRemoteFile ? file.copyWith() : file.copyWith(localID: null),
+ file.isRemoteFile ? file.copyWith() : (file.copyWith()..localID = null),
);
}
final skippedFilesCount = skippedFiles.length;
diff --git a/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dart b/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dart
index e498a4cf10..707d3ab8ef 100644
--- a/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dart
@@ -659,7 +659,7 @@ class FileAppBarState extends State<FileAppBar> {
}
final fileToDownload =
- !file.isRemoteFile ? file.copyWith(localID: null) : file;
+ !file.isRemoteFile ? (file.copyWith()..localID = null) : file;
if (flagService.internalUser) {
try {
await galleryDownloadQueueService.enqueueFiles([fileToDownload]);