fix(cluster): strip the skimmer suffix before resolving the spotter's continent
RBN spotters report as "VU2OY-#" and cluster nodes as "DL1ABC-2". That string went straight into the DXCC prefix matcher, which saw an unknown callsign and gave up, so every spot came back with an empty continent. The filter then matched nothing at all - and worse, silently: unresolved spots are deliberately never dropped, because the status arrives a moment after the row and filtering meanwhile makes the list flicker. So selecting AS left the Europeans and the Americans exactly where they were, with nothing to say why. A real callsign never contains a hyphen, so cutting at the first one is safe.
This commit is contained in:
@@ -16633,7 +16633,16 @@ func (a *App) ClusterSpotStatuses(spots []SpotQuery) []SpotStatus {
|
||||
// The spotter's continent, and whether the DX uploads to LoTW. Both are
|
||||
// in-memory lookups on tables already loaded, so they add nothing per spot.
|
||||
if a.dxcc != nil && q.Spotter != "" {
|
||||
if m, ok := a.dxcc.Lookup(q.Spotter); ok {
|
||||
// Strip the skimmer suffix first. RBN spotters report as "VU2OY-#" and
|
||||
// a cluster node as "DL1ABC-2"; the prefix matcher sees an unknown
|
||||
// callsign and gives up, so EVERY spot came back with no continent and
|
||||
// the filter silently matched nothing. A real callsign never contains a
|
||||
// hyphen, so cutting at the first one is safe.
|
||||
sp := q.Spotter
|
||||
if i := strings.IndexByte(sp, '-'); i > 0 {
|
||||
sp = sp[:i]
|
||||
}
|
||||
if m, ok := a.dxcc.Lookup(sp); ok {
|
||||
out[i].SpotterContinent = m.Continent
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user