feat: added selection of map 4 choices

This commit is contained in:
2026-06-16 21:49:02 +02:00
parent 16dc864dbd
commit abdab22010
6 changed files with 113 additions and 10 deletions
+17
View File
@@ -2452,6 +2452,16 @@ func (a *App) invalidateAwardStats() {
a.awardSnapMu.Unlock()
}
// RescanAwards forces the next award computation to re-pull the logbook from the
// database, bypassing the in-memory snapshot. Bound to the Awards panel's
// "Rescan" button so the operator can refresh after an external change the
// revision check can't see (e.g. a LoTW/QRZ confirmation download that only
// flips qsl_rcvd flags on existing rows).
func (a *App) RescanAwards() error {
a.invalidateAwardStats()
return nil
}
// awardRefMetas loads the reference lists of PREDEFINED awards (Dynamic=false)
// into the engine view. Dynamic awards (POTA/SOTA/…) are skipped — their lists
// are large and not needed for matching; their names are filled afterwards.
@@ -5416,6 +5426,13 @@ func (a *App) runDownloadConfirmations(svc extsvc.Service, cfg extsvc.ExternalSe
default:
emit(fmt.Sprintf("Confirmation download isn't available for %s yet.", svc))
}
// Confirmations flip lotw_rcvd/qsl_rcvd on EXISTING rows, which doesn't move
// the logbook revision (count:maxID) — so the cached award snapshot would
// stay stale. Drop it whenever anything was matched or added so the next
// Awards view reflects the new confirmations.
if matched > 0 || added > 0 {
a.invalidateAwardStats()
}
done(matched+added, total)
}