mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
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:
1 parent
9ed2aebc9d
commit
39d4498a54
14 files changed
+557
-14
No files matched your search
+6
-4
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user