feat(dxped): the announced DX, judged against your own log
A DXpeditions tab holding the two feeds the DX world announces itself on: NG3K's ADXO (structured — dates, entity, calls, bands, modes, QSL route) and DX-World's headlines. What a logger can say that a news reader cannot is whether the operation is worth chasing, so every announcement is put through the SAME verdict the cluster paints on a spot — one badge, strongest wins, dimmed when the need is only a missing QSL — with an 'only what I need' filter. One click watches every callsign of an operation; the news headlines are mined for callsigns so they can be watched the same way. Parsers ported from DXHunter's and pinned with table tests against real feed text: the 'as PJ2/W2APF' mining, the DXCC-prefix-first normalisation without which no spot ever matches, both ADXO date forms, and the '160-6m' span whose unit is written once (DXHunter read that as 6m alone and lost the low end). Watchlist membership now announces itself app-wide, on the same card as a new version: the bindings emit watchlist:changed, so a call added from the cluster or this tab is confirmed where the operator is actually looking — the panel's own inline message never was.
This commit is contained in:
+26
-2
@@ -55,7 +55,11 @@ func (a *App) WatchlistAdd(callsign string, contest bool) error {
|
||||
if a.watchlist == nil {
|
||||
return fmt.Errorf("watchlist not initialized")
|
||||
}
|
||||
return a.watchlist.Add(callsign, contest)
|
||||
if err := a.watchlist.Add(callsign, contest); err != nil {
|
||||
return err
|
||||
}
|
||||
a.notifyWatchlist(callsign, true)
|
||||
return nil
|
||||
}
|
||||
|
||||
// WatchlistRemove deletes an entry.
|
||||
@@ -63,7 +67,27 @@ func (a *App) WatchlistRemove(callsign string) error {
|
||||
if a.watchlist == nil {
|
||||
return fmt.Errorf("watchlist not initialized")
|
||||
}
|
||||
return a.watchlist.Remove(callsign)
|
||||
if err := a.watchlist.Remove(callsign); err != nil {
|
||||
return err
|
||||
}
|
||||
a.notifyWatchlist(callsign, false)
|
||||
return nil
|
||||
}
|
||||
|
||||
// notifyWatchlist announces a membership change to the UI.
|
||||
//
|
||||
// Emitted from the BINDINGS rather than from the watchlist panel, because a
|
||||
// call can now be added from three places (the panel, the cluster's menu, the
|
||||
// DXpeditions tab) and an operator who added one from the cluster saw nothing
|
||||
// at all — the confirmation lived inside a panel they were not looking at.
|
||||
func (a *App) notifyWatchlist(callsign string, added bool) {
|
||||
if a.ctx == nil {
|
||||
return
|
||||
}
|
||||
wruntime.EventsEmit(a.ctx, "watchlist:changed", map[string]any{
|
||||
"call": strings.ToUpper(strings.TrimSpace(callsign)),
|
||||
"added": added,
|
||||
})
|
||||
}
|
||||
|
||||
// WatchlistSetNotify arms the existing alert path (sound + toast) for an entry.
|
||||
|
||||
Reference in New Issue
Block a user