From 1e6ced2f3f6da23c0d663ca485ae051ee0059050 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Sat, 22 Jun 2024 15:41:38 +0900 Subject: [PATCH] fix --- packages/frontend/src/store.ts | 4 ---- packages/frontend/src/stream.ts | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index 02865fa565..e8eb5a1ed7 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -454,10 +454,6 @@ export const defaultStore = markRaw(new Storage('base', { where: 'device', default: true, }, - disableWebsocket: { - where: 'device', - default: false, - }, sound_masterVolume: { where: 'device', diff --git a/packages/frontend/src/stream.ts b/packages/frontend/src/stream.ts index 992dbb0837..e1986c8598 100644 --- a/packages/frontend/src/stream.ts +++ b/packages/frontend/src/stream.ts @@ -9,7 +9,6 @@ import { $i } from '@/account.js'; import { wsOrigin } from '@/config.js'; import { StreamMock } from '@/scripts/stream-mock.js'; import { isEmbedPage } from '@/scripts/embed-page.js'; -import { defaultStore } from '@/store.js'; // heart beat interval in ms const HEART_BEAT_INTERVAL = 1000 * 60; @@ -21,7 +20,8 @@ let lastHeartbeatCall = 0; export function useStream(): Misskey.Stream { if (stream) return stream; - if (isEmbedPage() || defaultStore.state.disableWebsocket === true) { + // TODO: No Websocketモードもここで判定 + if (isEmbedPage()) { stream = markRaw(new StreamMock(wsOrigin, null) as unknown as Misskey.Stream); return stream; } else {