Only switch to game settings if it's not empty (#652)

This commit is contained in:
redphx
2025-01-29 11:15:51 +07:00
parent bf23943da8
commit 706665713f
5 changed files with 32 additions and 19 deletions

View File

@@ -7,6 +7,10 @@ export class GameSettingsStorage extends BaseSettingsStorage<StreamPref> {
super(`${StorageKey.STREAM}.${id}`, StreamSettingsStorage.DEFINITIONS);
}
isEmpty() {
return Object.keys(this.settings).length === 0;
}
deleteSetting(pref: StreamPref) {
if (this.hasSetting(pref)) {
delete this.settings[pref];