Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Show back button on map without located photos

r4khul7f95c3306813
diff --git a/mobile/apps/photos/changes/map-empty-back-button.md b/mobile/apps/photos/changes/map-empty-back-button.md
new file mode 100644
index 0000000000..297057680d
--- /dev/null
+++ b/mobile/apps/photos/changes/map-empty-back-button.md
@@ -0,0 +1 @@
+- Fixed a missing back button on the map when no photos have a location.
diff --git a/mobile/apps/photos/lib/ui/map/map_screen.dart b/mobile/apps/photos/lib/ui/map/map_screen.dart
index fa041fed46..2c3ce0e545 100644
--- a/mobile/apps/photos/lib/ui/map/map_screen.dart
+++ b/mobile/apps/photos/lib/ui/map/map_screen.dart
@@ -16,6 +16,7 @@ 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";
+import "package:photos/ui/map/map_button.dart";
import "package:photos/ui/map/map_pull_up_gallery.dart";
import "package:photos/ui/map/map_view.dart";
import "package:photos/ui/notification/toast.dart";
@@ -413,6 +414,20 @@ class _MapScreenState extends State<MapScreen> {
),
)
: const SizedBox.shrink(),
+ if (initialCenter == null)
+ Positioned(
+ top: 4,
+ left: 10,
+ child: SafeArea(
+ child: MapButton(
+ icon: Icons.arrow_back,
+ onPressed: () {
+ Navigator.pop(context);
+ },
+ heroTag: 'back',
+ ),
+ ),
+ ),
],
),
bottomSheet: MapPullUpGallery(