mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-24 00:39:32 +09:00
fix
This commit is contained in:
parent
e4de174bb6
commit
1e6ced2f3f
@ -454,10 +454,6 @@ export const defaultStore = markRaw(new Storage('base', {
|
||||
where: 'device',
|
||||
default: true,
|
||||
},
|
||||
disableWebsocket: {
|
||||
where: 'device',
|
||||
default: false,
|
||||
},
|
||||
|
||||
sound_masterVolume: {
|
||||
where: 'device',
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user