Skip to content

armgit / ente

Public Imported from GitHub
0

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

show the description based on whether any photo have location

Prateek Sunal3438734ee542
diff --git a/mobile/apps/photos/lib/ui/map/map_pull_up_gallery.dart b/mobile/apps/photos/lib/ui/map/map_pull_up_gallery.dart
index b2a5891c8d..f349f2d8e0 100644
--- a/mobile/apps/photos/lib/ui/map/map_pull_up_gallery.dart
+++ b/mobile/apps/photos/lib/ui/map/map_pull_up_gallery.dart
@@ -23,6 +23,7 @@ class MapPullUpGallery extends StatefulWidget {
final StreamController<List<EnteFile>> visibleImages;
final double bottomUnsafeArea;
final double bottomSheetDraggableAreaHeight;
+ final bool hasLocationData;
static const gridCrossAxisSpacing = 4.0;
static const gridMainAxisSpacing = 4.0;
static const gridPadding = 2.0;
@@ -31,6 +32,7 @@ class MapPullUpGallery extends StatefulWidget {
this.visibleImages,
this.bottomSheetDraggableAreaHeight,
this.bottomUnsafeArea, {
+ this.hasLocationData = true,
super.key,
});
@@ -157,8 +159,11 @@ class _MapPullUpGalleryState extends State<MapPullUpGallery> {
),
const SizedBox(height: 4),
Text(
- AppLocalizations.of(context)
- .noImagesWithLocation,
+ widget.hasLocationData
+ ? AppLocalizations.of(context)
+ .zoomOutToSeePhotos
+ : AppLocalizations.of(context)
+ .noImagesWithLocation,
style: textTheme.smallFaint,
),
],
diff --git a/mobile/apps/photos/lib/ui/map/map_screen.dart b/mobile/apps/photos/lib/ui/map/map_screen.dart
index 3187db6772..9fca49675b 100644
--- a/mobile/apps/photos/lib/ui/map/map_screen.dart
+++ b/mobile/apps/photos/lib/ui/map/map_screen.dart
@@ -46,6 +46,7 @@ class _MapScreenState extends State<MapScreen> {
StreamController<List<EnteFile>>.broadcast();
MapController mapController = MapController();
bool isLoading = true;
+ bool hasLocationData = true;
double maxZoom = 18.0;
double minZoom = 2.8;
int debounceDuration = 500;
@@ -100,6 +101,7 @@ class _MapScreenState extends State<MapScreen> {
return;
}
setState(() {
+ hasLocationData = false;
imageMarkers = tempMarkers;
isLoading = false;
});
@@ -119,6 +121,7 @@ class _MapScreenState extends State<MapScreen> {
}
setState(() {
+ hasLocationData = true;
imageMarkers = tempMarkers;
});
@@ -276,6 +279,7 @@ class _MapScreenState extends State<MapScreen> {
visibleImages,
bottomSheetDraggableAreaHeight,
bottomUnsafeArea,
+ hasLocationData: hasLocationData,
),
),
),