fix: Showing beam heading on map even if no call is entered

This commit is contained in:
2026-06-22 21:46:41 +02:00
parent 824971d0a1
commit 79dc20a859
9 changed files with 109 additions and 36 deletions
+5 -2
View File
@@ -1621,8 +1621,9 @@ func scanAwardQSO(s scanner) (QSO, error) {
// NEW / NEW SLOT / WORKED in constant time after one batched query.
type EntitySlot struct {
Country string
Bands map[string]struct{} // bands worked, any mode
Slots map[string]map[string]struct{} // band → modes worked
Bands map[string]struct{} // bands worked, any mode
Modes map[string]struct{} // modes worked, any band
Slots map[string]map[string]struct{} // band → modes worked
}
// EntitySlotMap returns slot data for every QSO, grouped by DXCC entity NUMBER.
@@ -1667,11 +1668,13 @@ func (r *Repo) EntitySlotMap(ctx context.Context, keyFor func(call string, store
e = &EntitySlot{
Country: country,
Bands: make(map[string]struct{}),
Modes: make(map[string]struct{}),
Slots: make(map[string]map[string]struct{}),
}
out[key] = e
}
e.Bands[band] = struct{}{}
e.Modes[mode] = struct{}{}
bandSlots, ok := e.Slots[band]
if !ok {
bandSlots = make(map[string]struct{})