Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mobile][photos] prevent duplicate shared map photos

r4khul41e98bba5754
diff --git a/mobile/apps/photos/changes/shared-favorite-map-duplicates.md b/mobile/apps/photos/changes/shared-favorite-map-duplicates.md
new file mode 100644
index 0000000000..f412289893
--- /dev/null
+++ b/mobile/apps/photos/changes/shared-favorite-map-duplicates.md
@@ -0,0 +1 @@
+- Prevent duplicate shared map photos.
diff --git a/mobile/apps/photos/lib/ui/map/map_screen.dart b/mobile/apps/photos/lib/ui/map/map_screen.dart
index 84f7203181..fa041fed46 100644
--- a/mobile/apps/photos/lib/ui/map/map_screen.dart
+++ b/mobile/apps/photos/lib/ui/map/map_screen.dart
@@ -12,6 +12,7 @@ import "package:latlong2/latlong.dart";
import "package:logging/logging.dart";
import 'package:photos/models/file/file.dart';
import "package:photos/models/location/location.dart";
+import "package:photos/services/filter/db_filters.dart";
import "package:photos/src/rust/api/map_cluster_api.dart";
import "package:photos/theme/ente_theme.dart";
import "package:photos/ui/map/image_marker.dart";
@@ -76,7 +77,11 @@ class _MapScreenState extends State<MapScreen> {
Future<void> initialize() async {
try {
center = widget.center;
- allImages = await widget.filesFutureFn();
+ final unfilteredFiles = await widget.filesFutureFn();
+ allImages = await applyDBFilters(
+ unfilteredFiles,
+ DBFilterOptions(dedupeUploadID: false, ignoreSavedFiles: true),
+ );
await processFiles(allImages);
} catch (e, s) {
_logger.severe("Error initializing map screen", e, s);