Skip to content

armgit / ente

Public Imported from GitHub
0

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

feat(map in info): don't find most recent file when center point is passed as the most recent file is only used for using it as the center point

ashilknea19b1c73a36
diff --git a/lib/ui/map/map_screen.dart b/lib/ui/map/map_screen.dart
index 89f6aaa6f8..6eae2b696d 100644
--- a/lib/ui/map/map_screen.dart
+++ b/lib/ui/map/map_screen.dart
@@ -94,11 +94,14 @@ class _MapScreenState extends State<MapScreen> {
continue;
}
hasAnyLocation = true;
- if (mostRecentFile == null) {
- mostRecentFile = file;
- } else {
- if ((mostRecentFile.creationTime ?? 0) < (file.creationTime ?? 0)) {
+
+ if (widget.center == null) {
+ if (mostRecentFile == null) {
mostRecentFile = file;
+ } else {
+ if ((mostRecentFile.creationTime ?? 0) < (file.creationTime ?? 0)) {
+ mostRecentFile = file;
+ }
}
}