persistence again
Clean start worked but now the persisted is not working. Patching persistence.
This commit is contained in:
@@ -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();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user