Developer setting to show non-member tiles

This is based on top of https://github.com/element-hq/element-call/pull/2701
This commit is contained in:
Hugh Nimmo-Smith
2024-11-13 10:21:38 +00:00
parent e4087b2b45
commit 40526cb7c1
5 changed files with 142 additions and 6 deletions

View File

@@ -40,9 +40,11 @@ export class Setting<T> {
private readonly _value: BehaviorSubject<T>;
public readonly value: Observable<T>;
public readonly setValue = (value: T): void => {
public readonly setValue = (value: T, persist = true): void => {
this._value.next(value);
localStorage.setItem(this.key, JSON.stringify(value));
if (persist) {
localStorage.setItem(this.key, JSON.stringify(value));
}
};
}
@@ -75,6 +77,8 @@ export const developerSettingsTab = new Setting(
export const duplicateTiles = new Setting("duplicate-tiles", 0);
export const showNonMemberTiles = new Setting<boolean>("show-non-member-tiles", false);
export const audioInput = new Setting<string | undefined>(
"audio-input",
undefined,