This commit is contained in:
2026-06-06 00:02:56 +02:00
parent 51d3a734e8
commit 922a185208
10 changed files with 941 additions and 131 deletions
+6 -3
View File
@@ -793,10 +793,13 @@ export default function App() {
function applyModePreset(m: string) {
if (rstUserEditedRef.current) return;
// Prefer the user's configured preset RST; otherwise fall back to the mode
// category default (CW/RTTY/PSK → 599, phone → 59, digital → first option)
// so switching SSB→CW flips 59→599 even without a configured preset.
const p = modePresets.find((x) => x.name === m);
if (!p) return;
if (p.default_rst_sent) setRstSent(p.default_rst_sent);
if (p.default_rst_rcvd) setRstRcvd(p.default_rst_rcvd);
const fallback = rstOptions(m, rstLists)[0] || '';
setRstSent(p?.default_rst_sent || fallback);
setRstRcvd(p?.default_rst_rcvd || fallback);
}
useEffect(() => { refresh(); }, [refresh]);