Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob][photos] Clean up isSameFilter implementations

ashilkn863ba6b9550f
diff --git a/mobile/lib/models/search/hierarchical/album_filter.dart b/mobile/lib/models/search/hierarchical/album_filter.dart
index 2c126db9a7..bce7f7c674 100644
--- a/mobile/lib/models/search/hierarchical/album_filter.dart
+++ b/mobile/lib/models/search/hierarchical/album_filter.dart
@@ -14,6 +14,7 @@ class AlbumFilter extends HierarchicalSearchFilter {
required this.collectionID,
required this.albumName,
required this.occurrence,
+ super.matchedUploadedIDs,
});
@override
@@ -46,10 +47,7 @@ class AlbumFilter extends HierarchicalSearchFilter {
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.collection
- return resultType() == other.resultType() && other.name() == name();
+ return false;
}
@override
diff --git a/mobile/lib/models/search/hierarchical/contacts_filter.dart b/mobile/lib/models/search/hierarchical/contacts_filter.dart
index 5ac599272f..7c6db60600 100644
--- a/mobile/lib/models/search/hierarchical/contacts_filter.dart
+++ b/mobile/lib/models/search/hierarchical/contacts_filter.dart
@@ -42,10 +42,7 @@ class ContactsFilter extends HierarchicalSearchFilter {
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.shared
- return resultType() == other.resultType() && other.name() == name();
+ return false;
}
@override
diff --git a/mobile/lib/models/search/hierarchical/face_filter.dart b/mobile/lib/models/search/hierarchical/face_filter.dart
index 04b1b648f6..9d1dff0402 100644
--- a/mobile/lib/models/search/hierarchical/face_filter.dart
+++ b/mobile/lib/models/search/hierarchical/face_filter.dart
@@ -58,10 +58,7 @@ class FaceFilter extends HierarchicalSearchFilter {
if (other is FaceFilter) {
return other.personId == personId && other.clusterId == clusterId;
}
- // (other is FaceFilter) can be false and this.resultType() can be same as
- // other.resultType() if other is a TopLevelGenericFilter of resultType
- // ResultType.faces
- return resultType() == other.resultType() && other.name() == name();
+ return false;
}
@override
diff --git a/mobile/lib/models/search/hierarchical/file_type_filter.dart b/mobile/lib/models/search/hierarchical/file_type_filter.dart
index 4f5e616a80..ac77f9045f 100644
--- a/mobile/lib/models/search/hierarchical/file_type_filter.dart
+++ b/mobile/lib/models/search/hierarchical/file_type_filter.dart
@@ -60,10 +60,7 @@ class FileTypeFilter extends HierarchicalSearchFilter {
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.fileType
- return resultType() == other.resultType() && other.name() == name();
+ return false;
}
@override
diff --git a/mobile/lib/models/search/hierarchical/location_filter.dart b/mobile/lib/models/search/hierarchical/location_filter.dart
index 78f9293265..ff03dfd118 100644
--- a/mobile/lib/models/search/hierarchical/location_filter.dart
+++ b/mobile/lib/models/search/hierarchical/location_filter.dart
@@ -50,10 +50,7 @@ class LocationFilter extends HierarchicalSearchFilter {
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.location
- return resultType() == other.resultType() && other.name() == name();
+ return false;
}
@override