feat(map): tap worked grid at zoom>=7 to show per-grid satellite QSO dialog

- LoTW sync now stores per-QSO detail (call/time/sat/mode/bands) grouped by
  gridsquare (PROP_MODE=SAT only), single JSON blob in SharedPreferences
- GridQso model derives band label (V/U, U/V, V/A...) from BAND_RX/BAND
- Tap detection via osmdroid MapEventsOverlay; selected grid outlined green
- Centered dialog: calls sorted by first-contact time, first-QSO summary,
  expandable call rows list subsequent QSOs in that grid; tap outside closes
This commit is contained in:
atsunatsu committed 2026-09-08 02:47:54 +08:00
1 parent 9ed2aebc9d
commit 39d4498a54
14 files changed
+557 -14

No files matched your search

@@ -201,15 +201,17 @@ class SettingsViewModel(
settingsRepo.updateLoTWSettings(settings)
_uiState.update { it.copy(lotwSyncing = true, lotwMessage = null) }
viewModelScope.launch {
val lotwGrids = lotwRepo.fetchConfirmedGrids(settings.callsign, settings.password)
val lotwResult = lotwRepo.fetchConfirmedGridQsos(settings.callsign, settings.password)
_uiState.update { state ->
if (lotwGrids == null) {
if (lotwResult == null) {
state.copy(lotwSyncing = false, lotwMessage = "LoTW sync failed — check callsign/password/network")
} else {
// Wavelog entry removed: LoTW is now the only source, so the
// synced set fully replaces the stored worked grids.
settingsRepo.setWorkedGrids(lotwGrids)
state.copy(lotwSyncing = false, workedGridsCount = lotwGrids.size, lotwMessage = null)
val (grids, qsos) = lotwResult
settingsRepo.setWorkedGrids(grids)
settingsRepo.setWorkedGridQsos(qsos)
state.copy(lotwSyncing = false, workedGridsCount = grids.size, lotwMessage = null)
}
}
}