π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Revert "Skip localID update for already-local downloads"
ashilknade8606c88c0
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.dartindex 4439c95e98..1c457e8042 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@@ -670,9 +670,6 @@ class FileAppBarState extends State<FileAppBar> {if (file.localID == null || file.localID!.isEmpty) {return null;}- if (file.isSharedMediaToAppSandbox) {- return null;- }final asset = await file.getAsset;if (asset == null || !(await asset.exists)) {diff --git a/mobile/apps/photos/lib/utils/file_download_util.dart b/mobile/apps/photos/lib/utils/file_download_util.dartindex c25ebff1fb..41dbac9587 100644--- a/mobile/apps/photos/lib/utils/file_download_util.dart+++ b/mobile/apps/photos/lib/utils/file_download_util.dart@@ -221,8 +221,6 @@ Future<void> downloadToGallery(EnteFile file) async {final FileType type = file.fileType;final bool downloadLivePhotoOnDroid =type == FileType.livePhoto && Platform.isAndroid;- final bool shouldUpdateLocalIDReference =- file.isRemoteFile || file.isSharedMediaToAppSandbox;AssetEntity? savedAsset;final File? fileToSave = await getFile(file);// We use a lock to prevent synchronisation to occur while it is downloading@@ -256,20 +254,14 @@ Future<void> downloadToGallery(EnteFile file) async {}if (savedAsset != null) {- if (shouldUpdateLocalIDReference) {- file.localID = savedAsset!.id;- await FilesDB.instance.insert(file);- Bus.instance.fire(- LocalPhotosUpdatedEvent(- [file],- source: "download",- ),- );- } else {- _logger.info(- 'Skipping localID update after download; existing localID is already a gallery asset',- );- }+ file.localID = savedAsset!.id;+ await FilesDB.instance.insert(file);+ Bus.instance.fire(+ LocalPhotosUpdatedEvent(+ [file],+ source: "download",+ ),+ );} else if (!downloadLivePhotoOnDroid && savedAsset == null) {_logger.severe('Failed to save assert of type $type');}