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:
commit
51afc7bf7a
3 changed files with 16 additions and 4 deletions
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Add table
Reference in a new issue