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; } } diff --git a/pubspec.yaml b/pubspec.yaml index 7d9b4e70a..f34d0d93f 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'