From 11b46c671018f9f1ff5da11cb92f27adc545d0bd Mon Sep 17 00:00:00 2001 From: atsunatsu Date: Tue, 8 Sep 2026 05:54:06 +0800 Subject: [PATCH] feat(map): tap worked cells from GRID_ZOOM_SUB (lines visible), labels from zoom 6.5 - Tap-to-show-QSOs now works as soon as 4-char grid lines appear (zoom 6), not only when 4-char labels show (was zoom 7). Selection outline already used GRID_ZOOM_SUB, so feedback is immediate. - 4-char labels now appear from zoom 6.5 (was 7.0), so the sub-square name shows shortly after the lines appear instead of a full zoom level later. --- .../rtbishop/look4sat/feature/map/MaidenheadGridOverlay.kt | 4 ++-- .../main/java/com/rtbishop/look4sat/feature/map/MapScreen.kt | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/feature/map/src/main/java/com/rtbishop/look4sat/feature/map/MaidenheadGridOverlay.kt b/feature/map/src/main/java/com/rtbishop/look4sat/feature/map/MaidenheadGridOverlay.kt index 35d63e1f..6c37d8e6 100644 --- a/feature/map/src/main/java/com/rtbishop/look4sat/feature/map/MaidenheadGridOverlay.kt +++ b/feature/map/src/main/java/com/rtbishop/look4sat/feature/map/MaidenheadGridOverlay.kt @@ -415,8 +415,8 @@ class MaidenheadGridOverlay : Overlay() { // on-screen size of each square. const val GRID_ZOOM_SUB = 6.0 // Zoom at which the 4-char sub-square names appear (one level above the - // grid lines: zoom 6 = lines only, zoom 7+ = lines + names). - const val LABEL_ZOOM_SUB = 7.0 + // grid lines: zoom 6 = lines only, zoom 6.5+ = lines + names). + const val LABEL_ZOOM_SUB = 6.5 const val MIN_LABEL_CELL_PX = 48f const val MAX_OVERSHOOT_PX = 64 } 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 28cbc4a1..159ed3fd 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 @@ -153,7 +153,9 @@ private fun MapScreen(uiState: MapState, onAction: (MapAction) -> Unit, mapView: override fun singleTapConfirmedHelper(p: GeoPoint?): Boolean { if (!isGridMode || p == null) return false val zoom = mapView.zoomLevelDouble - if (zoom < MaidenheadGridOverlay.LABEL_ZOOM_SUB) return false + // Allow tapping worked cells as soon as the 4-char grid LINES + // appear (GRID_ZOOM_SUB), not only when labels show (LABEL_ZOOM_SUB). + if (zoom < MaidenheadGridOverlay.GRID_ZOOM_SUB) return false val grid = gridOfPoint(p.latitude, p.longitude) ?: return false if (grid !in workedGrids) return false selectedGrid = grid