always show current location on start, even if we were not following the location before

This commit is contained in:
johan12345
2025-06-14 17:32:24 +02:00
parent 5913d6a912
commit 18b7127034

View File

@@ -1127,9 +1127,13 @@ class MapFragment : Fragment(), OnMapReadyCallback, MenuProvider {
binding.search.requestFocus()
binding.search.setSelection(locationName.length)
}
if (context.checkAnyLocationPermission() && prefs.currentMapMyLocationEnabled) {
enableLocation(!positionSet, false)
positionSet = true
if (context.checkAnyLocationPermission()) {
if (prefs.currentMapMyLocationEnabled && !positionSet) {
enableLocation(true, false)
positionSet = true
} else {
enableLocation(false, false)
}
}
if (!positionSet) {
// use position saved in preferences, fall back to default (Europe)