From da7f9d269975cb7d7af62c3ac440a72bad2d5158 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Mon, 9 Jan 2023 13:58:43 +0530 Subject: [PATCH 1/2] Fix reset ignore logic for droid --- lib/services/ignored_files_service.dart | 8 ++++++++ lib/ui/viewer/gallery/device_folder_page.dart | 10 +++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/services/ignored_files_service.dart b/lib/services/ignored_files_service.dart index f363b6ff7..4dfbf576c 100644 --- a/lib/services/ignored_files_service.dart +++ b/lib/services/ignored_files_service.dart @@ -99,6 +99,14 @@ class IgnoredFilesService { ); } + String? getIgnoredIDForFile(File file) { + return _getIgnoreID( + file.localID, + file.deviceFolder, + file.title, + ); + } + // _getIgnoreID will return null if don't have sufficient information // to ignore the file based on the platform. Uploads from web or files shared to // end usually don't have local id. diff --git a/lib/ui/viewer/gallery/device_folder_page.dart b/lib/ui/viewer/gallery/device_folder_page.dart index e264c1788..c27f10b1b 100644 --- a/lib/ui/viewer/gallery/device_folder_page.dart +++ b/lib/ui/viewer/gallery/device_folder_page.dart @@ -194,12 +194,16 @@ class _BackupHeaderWidgetState extends State { Future> filesInDeviceCollection) async { final List deviceCollectionFiles = await filesInDeviceCollection; - final localIDsOfFiles = {}; + final ignoredIdsForFile = {}; for (File file in deviceCollectionFiles) { - localIDsOfFiles.add(file.localID!); + final String? ignoreID = + IgnoredFilesService.instance.getIgnoredIDForFile(file); + if (ignoreID != null) { + ignoredIdsForFile.add(ignoreID); + } } final ignoredFiles = await IgnoredFilesService.instance.ignoredIDs; - return ignoredFiles.intersection(localIDsOfFiles).isNotEmpty; + return ignoredFiles.intersection(ignoredIdsForFile).isNotEmpty; } } From 7a97c0f5afc9f95e1e66cf37ed475b01b7413f64 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Mon, 9 Jan 2023 13:59:04 +0530 Subject: [PATCH 2/2] bump version to 0.7.8+408 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 7a37c0d1a..330314359 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,7 +12,7 @@ description: ente photos application # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 0.7.7+407 +version: 0.7.8+408 environment: sdk: '>=2.17.0 <3.0.0'