From 8e597cf71c451313ad1d4c7c2c7c5996b0f7ebf8 Mon Sep 17 00:00:00 2001 From: Tobias Zwick Date: Mon, 9 Sep 2024 20:43:51 +0200 Subject: [PATCH] don't reset rotation to 0 on disabling navigation mode after all (fix #5886) --- .../streetcomplete/screens/main/map/MainMapFragment.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/de/westnordost/streetcomplete/screens/main/map/MainMapFragment.kt b/app/src/main/java/de/westnordost/streetcomplete/screens/main/map/MainMapFragment.kt index 03683d7d00..489d9ac426 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/screens/main/map/MainMapFragment.kt +++ b/app/src/main/java/de/westnordost/streetcomplete/screens/main/map/MainMapFragment.kt @@ -550,10 +550,9 @@ class MainMapFragment : MapFragment(), ShowsGeometryMarkers { private fun onUpdatedNavigationMode() { if (!isNavigationMode) { - updateCameraPosition(300) { - rotation = 0.0 - tilt = 0.0 - } + // don't reset the rotation to 0 here, because this behavior is useful (#5886) + // (users can always reset it by tapping on the compass) + updateCameraPosition(300) { tilt = 0.0 } } else { centerCurrentPositionIfFollowing() }