fix
This commit is contained in:
parent
e4de174bb6
commit
1e6ced2f3f
|
@ -454,10 +454,6 @@ export const defaultStore = markRaw(new Storage('base', {
|
||||||
where: 'device',
|
where: 'device',
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
disableWebsocket: {
|
|
||||||
where: 'device',
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
|
|
||||||
sound_masterVolume: {
|
sound_masterVolume: {
|
||||||
where: 'device',
|
where: 'device',
|
||||||
|
|
|
@ -9,7 +9,6 @@ import { $i } from '@/account.js';
|
||||||
import { wsOrigin } from '@/config.js';
|
import { wsOrigin } from '@/config.js';
|
||||||
import { StreamMock } from '@/scripts/stream-mock.js';
|
import { StreamMock } from '@/scripts/stream-mock.js';
|
||||||
import { isEmbedPage } from '@/scripts/embed-page.js';
|
import { isEmbedPage } from '@/scripts/embed-page.js';
|
||||||
import { defaultStore } from '@/store.js';
|
|
||||||
|
|
||||||
// heart beat interval in ms
|
// heart beat interval in ms
|
||||||
const HEART_BEAT_INTERVAL = 1000 * 60;
|
const HEART_BEAT_INTERVAL = 1000 * 60;
|
||||||
|
@ -21,7 +20,8 @@ let lastHeartbeatCall = 0;
|
||||||
export function useStream(): Misskey.Stream {
|
export function useStream(): Misskey.Stream {
|
||||||
if (stream) return 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);
|
stream = markRaw(new StreamMock(wsOrigin, null) as unknown as Misskey.Stream);
|
||||||
return stream;
|
return stream;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue