Fix Settings not persisting, ooop
This commit is contained in:
parent
897df3a5d4
commit
bfb9af05b0
1 changed files with 3 additions and 3 deletions
|
@ -67,7 +67,7 @@ export class SettingsStore<T extends object> {
|
||||||
* Set the data of the store.
|
* Set the data of the store.
|
||||||
* This will update this.store and this.plain (and old references to them will be stale! Avoid storing them in variables)
|
* This will update this.store and this.plain (and old references to them will be stale! Avoid storing them in variables)
|
||||||
*
|
*
|
||||||
* Additionally, all global listeners (or those for pathToNotify, if specified) will be called with the new data
|
* Additionally, all global listeners (and those for pathToNotify, if specified) will be called with the new data
|
||||||
* @param value New data
|
* @param value New data
|
||||||
* @param pathToNotify Optional path to notify instead of globally. Used to transfer path via ipc
|
* @param pathToNotify Optional path to notify instead of globally. Used to transfer path via ipc
|
||||||
*/
|
*/
|
||||||
|
@ -90,9 +90,9 @@ export class SettingsStore<T extends object> {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.pathListeners.get(pathToNotify)?.forEach(cb => cb(v));
|
this.pathListeners.get(pathToNotify)?.forEach(cb => cb(v));
|
||||||
} else {
|
|
||||||
this.globalListeners.forEach(cb => cb(value, ""));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.globalListeners.forEach(cb => cb(value, ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue