fix: who's-on-air freq/appearance lag — prompt publish on activity + 5s widget poll

publishLiveStatus only ran on QSO log or the 15s heartbeat, and the widget polled
every 15s, so an operator's band/freq (and their appearance) could trail by up to
a minute. Now ReportLiveActivity debounce-publishes ~1.5s after a freq/band/mode
change, and the widget polls every 5s (and 1.5s after qso:logged).
This commit is contained in:
2026-07-20 19:17:13 +02:00
parent 6356d60a66
commit 22352c5748
3 changed files with 18 additions and 4 deletions
+2 -2
View File
@@ -451,9 +451,9 @@ export default function App() {
if (!liveStationsOn) { setLiveStations([]); return; }
const load = () => GetLiveStations().then((s) => setLiveStations((s ?? []) as LiveStation[])).catch(() => {});
load();
const id = window.setInterval(load, 15 * 1000);
const id = window.setInterval(load, 5 * 1000);
// Small delay lets the async publishLiveStatus MySQL write land before we read.
const offLogged = EventsOn('qso:logged', () => { window.setTimeout(load, 2000); });
const offLogged = EventsOn('qso:logged', () => { window.setTimeout(load, 1500); });
return () => { window.clearInterval(id); offLogged?.(); };
}, [liveStationsOn]);
// Mode OpsLog shows when the rig reports generic DIG_U/DIG_L. OmniRig