π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][photos] Make implementation of abstract fn isSameFilter() more accurate when the fn is used to compare two same sub-HierarchicalSearchFilter types
ashilkn66a13392a920
diff --git a/mobile/lib/models/search/hierarchical/album_filter.dart b/mobile/lib/models/search/hierarchical/album_filter.dartindex cf55a94a30..2c126db9a7 100644--- a/mobile/lib/models/search/hierarchical/album_filter.dart+++ b/mobile/lib/models/search/hierarchical/album_filter.dart@@ -43,6 +43,12 @@ class AlbumFilter extends HierarchicalSearchFilter {@overridebool isSameFilter(HierarchicalSearchFilter other) {+ if (other is AlbumFilter) {+ return other.collectionID == collectionID;+ }+ // (other is AlbumFilter) can be false and this.resultType() can be same as+ // other.resultType() if other is a TopLevelGenericFilter of resultType+ // ResultType.collectionreturn resultType() == other.resultType() && other.name() == name();}diff --git a/mobile/lib/models/search/hierarchical/contacts_filter.dart b/mobile/lib/models/search/hierarchical/contacts_filter.dartindex e700a84bdc..b328ecc0df 100644--- a/mobile/lib/models/search/hierarchical/contacts_filter.dart+++ b/mobile/lib/models/search/hierarchical/contacts_filter.dart@@ -38,6 +38,12 @@ class ContactsFilter extends HierarchicalSearchFilter {@overridebool isSameFilter(HierarchicalSearchFilter other) {+ if (other is ContactsFilter) {+ return other.user.id == user.id;+ }+ // (other is ContactsFilter) can be false and this.resultType() can be same as+ // other.resultType() if other is a TopLevelGenericFilter of resultType+ // ResultType.sharedreturn resultType() == other.resultType() && other.name() == name();}diff --git a/mobile/lib/models/search/hierarchical/face_filter.dart b/mobile/lib/models/search/hierarchical/face_filter.dartindex 463f22d9df..42d2daeef9 100644--- a/mobile/lib/models/search/hierarchical/face_filter.dart+++ b/mobile/lib/models/search/hierarchical/face_filter.dart@@ -49,6 +49,12 @@ class FaceFilter extends HierarchicalSearchFilter {@overridebool isSameFilter(HierarchicalSearchFilter other) {+ if (other is FaceFilter) {+ return other.id == id;+ }+ // (other is FaceFilter) can be false and this.resultType() can be same as+ // other.resultType() if other is a TopLevelGenericFilter of resultType+ // ResultType.facesreturn resultType() == other.resultType() && other.name() == name();}diff --git a/mobile/lib/models/search/hierarchical/file_type_filter.dart b/mobile/lib/models/search/hierarchical/file_type_filter.dartindex 9e18715641..4f5e616a80 100644--- a/mobile/lib/models/search/hierarchical/file_type_filter.dart+++ b/mobile/lib/models/search/hierarchical/file_type_filter.dart@@ -57,6 +57,12 @@ class FileTypeFilter extends HierarchicalSearchFilter {@overridebool isSameFilter(HierarchicalSearchFilter other) {+ if (other is FileTypeFilter) {+ return other.fileType == fileType;+ }+ // (other is FileTypeFilter) can be false and this.resultType() can be same as+ // other.resultType() if other is a TopLevelGenericFilter of resultType+ // ResultType.fileTypereturn resultType() == other.resultType() && other.name() == name();}diff --git a/mobile/lib/models/search/hierarchical/location_filter.dart b/mobile/lib/models/search/hierarchical/location_filter.dartindex edc5f728c2..f38228cdc9 100644--- a/mobile/lib/models/search/hierarchical/location_filter.dart+++ b/mobile/lib/models/search/hierarchical/location_filter.dart@@ -41,6 +41,17 @@ class LocationFilter extends HierarchicalSearchFilter {@overridebool isSameFilter(HierarchicalSearchFilter other) {+ if (other is LocationFilter) {+ return other.locationTag.radius.toString() ++ other.locationTag.centerPoint.toString() ++ other.locationTag.name ==+ locationTag.radius.toString() ++ locationTag.centerPoint.toString() ++ locationTag.name;+ }+ // (other is LocationFilter) can be false and this.resultType() can be same as+ // other.resultType() if other is a TopLevelGenericFilter of resultType+ // ResultType.locationreturn resultType() == other.resultType() && other.name() == name();}