mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-23 10:40:36 +01:00
fix
This commit is contained in:
parent
e4de174bb6
commit
1e6ced2f3f
2 changed files with 2 additions and 6 deletions
|
@ -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 a new issue