chore: release v0.23.0

This commit is contained in:
2026-08-02 20:03:16 +02:00
parent f6cd6e999a
commit 72f692aa04
13 changed files with 433 additions and 88 deletions
+16 -5
View File
@@ -2112,11 +2112,22 @@ export default function App() {
setModePresets(l.modes);
const names = l.modes.map((m) => m.name);
setModes(names);
setMode((cur) => names.includes(cur) ? cur : names[0]);
const preset = l.modes.find((m) => m.name === mode) ?? l.modes[0];
if (preset && !rstUserEditedRef.current) {
if (preset.default_rst_sent) setRstSent(preset.default_rst_sent);
if (preset.default_rst_rcvd) setRstRcvd(preset.default_rst_rcvd);
// Resolve the mode we are ACTUALLY on, then take that mode's report.
//
// This used to read the `mode` state variable, which this callback
// captures once (its dep list is empty) — so it was still the initial
// 'SSB' — and fell back to l.modes[0], SSB again, when the lookup
// missed. An operator who launched OpsLog with the rig already in CW
// and did not touch the VFO got 59/59 and kept it: nothing else runs
// until the CAT state actually changes.
const cur = names.includes(modeRef.current) ? modeRef.current : names[0];
setMode(cur);
if (!rstUserEditedRef.current) {
const lists: RSTLists = { phone: (l as any).rst_phone ?? [], cw: (l as any).rst_cw ?? [], digital: (l as any).rst_digital ?? [] };
const p = l.modes.find((m) => m.name === cur);
const fallback = rstOptions(cur, lists)[0] || '';
setRstSent(p?.default_rst_sent || fallback);
setRstRcvd(p?.default_rst_rcvd || fallback);
}
}
} catch {}