chore: release v0.23.1
This commit is contained in:
@@ -15476,6 +15476,12 @@ type SpotStatus struct {
|
||||
// when that database has been downloaded); POTA from the spot's tagged park.
|
||||
NewCounty bool `json:"new_county"`
|
||||
NewPOTA bool `json:"new_pota"`
|
||||
// NewPfx flags a CQ WPX prefix never worked before, and Pfx is that prefix.
|
||||
// Also orthogonal: a common entity on a worked band can still carry a prefix
|
||||
// that has never been in the log, which is exactly what a WPX chaser is
|
||||
// scanning the cluster for.
|
||||
NewPfx bool `json:"new_pfx"`
|
||||
Pfx string `json:"pfx,omitempty"`
|
||||
}
|
||||
|
||||
// ClusterSpotStatuses takes a batch of spots and returns slot status for
|
||||
@@ -15531,6 +15537,16 @@ func (a *App) ClusterSpotStatuses(spots []SpotQuery) []SpotStatus {
|
||||
// lookup) and worked POTA parks. Both built once per batch.
|
||||
workedCounties, _ := a.qso.WorkedCountyKeys(a.ctx, award.USCountyKey)
|
||||
workedPOTA, _ := a.qso.WorkedPOTARefs(a.ctx)
|
||||
// Worked WPX prefixes, derived from the callsigns we already loaded — no
|
||||
// extra query. Derived rather than read from the stored PFX column: that
|
||||
// column is only filled when an import supplied it, and deriving keeps this
|
||||
// in step with the WPX award, which does the same thing.
|
||||
workedPfx := make(map[string]struct{}, len(workedCalls))
|
||||
for c := range workedCalls {
|
||||
if p := award.WPXPrefix(c); p != "" {
|
||||
workedPfx[p] = struct{}{}
|
||||
}
|
||||
}
|
||||
for i, q := range spots {
|
||||
out[i] = SpotStatus{
|
||||
Call: q.Call,
|
||||
@@ -15540,6 +15556,13 @@ func (a *App) ClusterSpotStatuses(spots []SpotQuery) []SpotStatus {
|
||||
if _, ok := workedCalls[strings.ToUpper(q.Call)]; ok {
|
||||
out[i].WorkedCall = true
|
||||
}
|
||||
// NEW PFX: the spot's CQ WPX prefix, never worked before.
|
||||
if p := award.WPXPrefix(q.Call); p != "" {
|
||||
out[i].Pfx = p
|
||||
if _, done := workedPfx[p]; !done {
|
||||
out[i].NewPfx = true
|
||||
}
|
||||
}
|
||||
// NEW POTA: the spot's tagged park, never worked before.
|
||||
if ref := strings.ToUpper(strings.TrimSpace(q.POTARef)); ref != "" {
|
||||
if _, done := workedPOTA[ref]; !done {
|
||||
|
||||
Reference in New Issue
Block a user