fix(cluster): WORKED chip filters worked-call only, not the entity status
The WORKED filter also matched the entity status 'worked' (entity/band/mode already worked, shown as a plain "—"), so selecting WORKED still listed spots of calls never worked. Match the 'worked' key only via worked_call (the blue WKD-CALL flag); a worked call still shows under NEW BAND / NEW SLOT.
This commit is contained in:
@@ -4490,11 +4490,14 @@ export default function App() {
|
||||
const k = spotStatusKey(s.dx_call, s.band ?? '', s.comment ?? '', s.freq_hz);
|
||||
const e = spotStatus[k];
|
||||
const st = (e?.status || '') as SpotStatusKey;
|
||||
// A previously-worked call counts as WORKED for filtering even when its
|
||||
// entity status is still new-band/new-slot (the grid flags it WKD CALL),
|
||||
// matching the "Hide worked" toggle. Additive: it still matches its own
|
||||
// entity status too, so it stays visible under NEW BAND / NEW SLOT.
|
||||
const matches = clusterStatusFilter.has(st)
|
||||
// WORKED means "I've worked THIS callsign" — the blue WKD-CALL flag —
|
||||
// NOT the entity status 'worked' (entity/band/mode already worked, which
|
||||
// the grid shows as a plain "—"). So the 'worked' key is matched ONLY via
|
||||
// worked_call below; exclude the entity status 'worked' from the generic
|
||||
// match, or every "already-worked-entity" spot would slip through. A
|
||||
// worked call still matches its own entity status too (new-band/new-slot),
|
||||
// so it stays visible under those chips.
|
||||
const matches = (st !== 'worked' && clusterStatusFilter.has(st))
|
||||
|| (!!e?.worked_call && clusterStatusFilter.has('worked'))
|
||||
|| (!!e?.new_pota && clusterStatusFilter.has('new-pota'))
|
||||
|| (!!e?.new_county && clusterStatusFilter.has('new-county'))
|
||||
|
||||
Reference in New Issue
Block a user