persistence again

Clean start worked but now the persisted is not working. Patching persistence.
This commit is contained in:
Extremesecrecy
2025-07-26 10:01:24 -07:00
parent 530277ed71
commit c9e5e97b00
@@ -472,7 +472,11 @@ const JackServerSettingsDialog = withStyles(
componentWillUnmount() { componentWillUnmount() {
super.componentWillUnmount(); super.componentWillUnmount();
this.mounted = false; this.mounted = false;
this.stopStatusTimer(); this.stopStatusTimer();
if (this.originalJackServerSettings) {
this.model.setJackServerSettings(this.originalJackServerSettings);
this.originalJackServerSettings = undefined;
}
} }
getSelectedDevice(deviceId: string): AlsaDeviceInfo | undefined { getSelectedDevice(deviceId: string): AlsaDeviceInfo | undefined {
@@ -558,6 +562,9 @@ const JackServerSettingsDialog = withStyles(
let s = this.state.jackServerSettings.clone(); let s = this.state.jackServerSettings.clone();
s.valid = true; s.valid = true;
this.props.onApply(s); this.props.onApply(s);
// Prevent componentWillUnmount from reverting after the
// settings have been saved.
this.originalJackServerSettings = undefined;
}; };
handleWarningProceed() { handleWarningProceed() {
@@ -612,6 +619,7 @@ const JackServerSettingsDialog = withStyles(
const handleClose = () => { const handleClose = () => {
if (this.originalJackServerSettings) { if (this.originalJackServerSettings) {
this.model.setJackServerSettings(this.originalJackServerSettings); this.model.setJackServerSettings(this.originalJackServerSettings);
this.originalJackServerSettings = undefined;
} }
onClose(); onClose();
}; };