Preload reaction sounds to prevent delays.

This commit is contained in:
Half-Shot
2024-11-07 09:01:58 +00:00
parent b4a126d466
commit 6294fbb8e1
4 changed files with 83 additions and 36 deletions

View File

@@ -12,7 +12,10 @@ import { useObservableEagerState } from "observable-hooks";
import { PosthogAnalytics } from "../analytics/PosthogAnalytics";
export class Setting<T> {
public constructor(key: string, defaultValue: T) {
public constructor(
key: string,
public readonly defaultValue: T,
) {
this.key = `matrix-setting-${key}`;
const storedValue = localStorage.getItem(this.key);