Skip to content

High performance self-hosted photo and video management solution.

fix: send correct includeArchived parameter to API when showing markers in map (#20117)

Pablo Lluche34f46fa0d32
diff --git a/mobile/lib/providers/map/map_marker.provider.dart b/mobile/lib/providers/map/map_marker.provider.dart
index 23342b77b3..a0a11a0637 100644
--- a/mobile/lib/providers/map/map_marker.provider.dart
+++ b/mobile/lib/providers/map/map_marker.provider.dart
@@ -12,8 +12,8 @@ Future<List<MapMarker>> mapMarkers(Ref ref) async {
final mapState = ref.read(mapStateNotifierProvider);
DateTime? fileCreatedAfter;
bool? isFavorite;
- bool? isIncludeArchived;
- bool? isWithPartners;
+ bool isIncludeArchived = mapState.includeArchived;
+ bool isWithPartners = mapState.withPartners;
if (mapState.relativeTime != 0) {
fileCreatedAfter =
@@ -24,14 +24,6 @@ Future<List<MapMarker>> mapMarkers(Ref ref) async {
isFavorite = true;
}
- if (!mapState.includeArchived) {
- isIncludeArchived = false;
- }
-
- if (mapState.withPartners) {
- isWithPartners = true;
- }
-
final markers = await service.getMapMarkers(
isFavorite: isFavorite,
withArchived: isIncludeArchived,
diff --git a/mobile/lib/providers/map/map_marker.provider.g.dart b/mobile/lib/providers/map/map_marker.provider.g.dart
index 76cc44a103..a4c1db7dc0 100644
--- a/mobile/lib/providers/map/map_marker.provider.g.dart
+++ b/mobile/lib/providers/map/map_marker.provider.g.dart
@@ -6,7 +6,7 @@ part of 'map_marker.provider.dart';
// RiverpodGenerator
// **************************************************************************
-String _$mapMarkersHash() => r'f33ac4baa3251b3f06423aece89673315966f885';
+String _$mapMarkersHash() => r'a0c129fcddbf1b9bce4aafcd2e47a858ab6ef1c9';
/// See also [mapMarkers].
@ProviderFor(mapMarkers)
diff --git a/web/src/lib/components/shared-components/map/map.svelte b/web/src/lib/components/shared-components/map/map.svelte
index 8e3a37cbf0..8d508552bc 100644
--- a/web/src/lib/components/shared-components/map/map.svelte
+++ b/web/src/lib/components/shared-components/map/map.svelte
@@ -189,7 +189,7 @@
return await getMapMarkers(
{
- isArchived: includeArchived && undefined,
+ isArchived: includeArchived || undefined,
isFavorite: onlyFavorites || undefined,
fileCreatedAfter: fileCreatedAfter || undefined,
fileCreatedBefore,