diff --git a/apps/app/src/lib/remote-player/provider.ts b/apps/app/src/lib/remote-player/provider.ts index 2020379e..9d194b92 100644 --- a/apps/app/src/lib/remote-player/provider.ts +++ b/apps/app/src/lib/remote-player/provider.ts @@ -290,7 +290,8 @@ class WebviewLoadError extends Error { } function notifyLogin() { - const notified = localStorage.getItem("mx:webview-login-notified"); + const label = "mx:webview-login-notified"; + const notified = localStorage.getItem(label); if (notified) return; new Notice( createFragment((e) => { @@ -311,5 +312,5 @@ function notifyLogin() { }), 0, ); - localStorage.setItem("mx:webview-login-notified", "1"); + localStorage.setItem(label, "1"); } diff --git a/apps/app/src/media-view/base.tsx b/apps/app/src/media-view/base.tsx index a01829a1..998b18ad 100644 --- a/apps/app/src/media-view/base.tsx +++ b/apps/app/src/media-view/base.tsx @@ -49,7 +49,8 @@ export function titleFromUrl(src: string): string { export function addAction(player: PlayerComponent & ItemView) { function noticeBehavior(action: string) { - const notified = localStorage.getItem("mx:media-notetaking-notice"); + const label = "mx:media-notetaking-notified"; + const notified = localStorage.getItem(label); if (notified) return; new Notice( createFragment((e) => { @@ -66,7 +67,7 @@ export function addAction(player: PlayerComponent & ItemView) { }), 0, ); - localStorage.setItem("mx:media-noting-notice", "1"); + localStorage.setItem(label, "1"); } player.addAction("star", "Timestamp", () => { const info = player.getMediaInfo();