Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
Merge branch 'release_reset_ignore_fix' into independent
Browse files Browse the repository at this point in the history
  • Loading branch information
ua741 committed Jan 9, 2023
2 parents 0d9ad9b + 7a97c0f commit 931282e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
8 changes: 8 additions & 0 deletions lib/services/ignored_files_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 7 additions & 3 deletions lib/ui/viewer/gallery/device_folder_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,16 @@ class _BackupHeaderWidgetState extends State<BackupHeaderWidget> {
Future<List<File>> filesInDeviceCollection) async {
final List<File> deviceCollectionFiles = await filesInDeviceCollection;

final localIDsOfFiles = <String>{};
final ignoredIdsForFile = <String>{};
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;
}
}

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 931282e

Please sign in to comment.