From 2eb6d6cd5bd9071553f8215c71085b5418069b89 Mon Sep 17 00:00:00 2001 From: atsunatsu Date: Mon, 7 Sep 2026 22:54:19 +0800 Subject: [PATCH] fix(map): stop satellite tracking animation in grid mode so it stays centered on the local grid --- .../main/java/com/rtbishop/look4sat/feature/map/MapScreen.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/feature/map/src/main/java/com/rtbishop/look4sat/feature/map/MapScreen.kt b/feature/map/src/main/java/com/rtbishop/look4sat/feature/map/MapScreen.kt index a9a9ff89..368292bb 100644 --- a/feature/map/src/main/java/com/rtbishop/look4sat/feature/map/MapScreen.kt +++ b/feature/map/src/main/java/com/rtbishop/look4sat/feature/map/MapScreen.kt @@ -139,6 +139,10 @@ private fun MapScreen(uiState: MapState, onAction: (MapAction) -> Unit, mapView: val isTimeAos = uiState.mapData?.isTimeAos ?: true LaunchedEffect(uiState.track) { + // In grid mode the map is centered on the local grid square; following + // the satellite subpoint here would override that centering on every + // track update, so skip the tracking animation entirely. + if (uiState.isGridMode) return@LaunchedEffect val firstPos = uiState.track?.firstOrNull()?.firstOrNull() ?: return@LaunchedEffect mapView.controller.animateTo(GeoPoint(firstPos.latitude, firstPos.longitude)) }