embedページの判定をconfig.tsに移行

This commit is contained in:
kakkokari-gtyih
2024-06-29 17:18:32 +09:00
parent 1926fa304b
commit 237605d6b8
9 changed files with 24 additions and 26 deletions

View File

@@ -8,7 +8,7 @@ import { markRaw } from 'vue';
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 { embedPage } from '@/config.js';
// heart beat interval in ms
const HEART_BEAT_INTERVAL = 1000 * 60;
@@ -21,7 +21,7 @@ export function useStream(): Misskey.IStream {
if (stream) return stream;
// TODO: No Websocketモードもここで判定
if (isEmbedPage()) {
if (embedPage) {
stream = markRaw(new StreamMock(wsOrigin, null));
return stream;
} else {