up
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user