move internal state from settings.json to state.json
This commit is contained in:
15
src/shared/settings.d.ts
vendored
15
src/shared/settings.d.ts
vendored
@@ -20,19 +20,22 @@ export interface Settings {
|
||||
arRPC?: boolean;
|
||||
appBadge?: boolean;
|
||||
discordWindowsTitleBar?: boolean;
|
||||
|
||||
maximized?: boolean;
|
||||
minimized?: boolean;
|
||||
windowBounds?: Rectangle;
|
||||
disableMinSize?: boolean;
|
||||
|
||||
checkUpdates?: boolean;
|
||||
skippedUpdate?: string;
|
||||
firstLaunch?: boolean;
|
||||
|
||||
splashTheming?: boolean;
|
||||
splashColor?: string;
|
||||
splashBackground?: string;
|
||||
}
|
||||
|
||||
export interface State {
|
||||
maximized?: boolean;
|
||||
minimized?: boolean;
|
||||
windowBounds?: Rectangle;
|
||||
|
||||
skippedUpdate?: string;
|
||||
firstLaunch?: boolean;
|
||||
|
||||
steamOSLayoutVersion?: number;
|
||||
}
|
||||
|
||||
@@ -144,4 +144,11 @@ export class SettingsStore<T extends object> {
|
||||
listeners.delete(cb);
|
||||
if (!listeners.size) this.pathListeners.delete(path as string);
|
||||
}
|
||||
|
||||
/**
|
||||
* Call all global change listeners
|
||||
*/
|
||||
public markAsChanged() {
|
||||
this.globalListeners.forEach(cb => cb(this.plain, ""));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user