Merge pull request #795 from ente-io/release_reset_ignore_fix

Fix logic for computing reset ignore flag on droid
This commit is contained in:
Neeraj Gupta 2023-01-09 14:09:53 +05:30 committed by GitHub
commit 51afc7bf7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 4 deletions

View file

@ -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.

View file

@ -195,12 +195,16 @@ class _BackupHeaderWidgetState extends State<BackupHeaderWidget> {
) 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;
}
}

View file

@ -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'