From aab714b277593be94ce7ce18a5e92ee6982e234f Mon Sep 17 00:00:00 2001 From: Fairy-Phy Date: Sun, 22 Oct 2023 20:08:19 +0900 Subject: [PATCH] fact: change to disableStreamingTimeline --- locales/en-US.yml | 2 +- locales/index.d.ts | 2 +- locales/ja-JP.yml | 2 +- packages/frontend/src/components/MkTimeline.vue | 2 +- packages/frontend/src/pages/settings/general.vue | 6 +++--- packages/frontend/src/store.ts | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index 354f90e5cf..9d7b977487 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1142,7 +1142,7 @@ tosAndPrivacyPolicy: "Terms of Service and Privacy Policy" releaseToRefresh: "Release to reload" refreshing: "Reloading" pullDownToRefresh: "Pull down to reload" -disableWebSocket: "Disable realtime update on timeline" +disableStreamingTimeline: "Disable realtime update on timeline" _announcement: forExistingUsers: "Existing users only" forExistingUsersDescription: "This announcement will only be shown to users existing at the point of publishment if enabled. If disabled, those newly signing up after it has been posted will also see it." diff --git a/locales/index.d.ts b/locales/index.d.ts index 160874f31b..0a3f19aa6d 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1155,7 +1155,7 @@ export interface Locale { "releaseToRefresh": string; "refreshing": string; "pullDownToRefresh": string; - "disableWebSocket": string; + "disableStreamingTimeline": string; "_announcement": { "forExistingUsers": string; "forExistingUsersDescription": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 68286bcefc..15c69813e3 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1152,7 +1152,7 @@ showAvatarDecorations: "アイコンのデコレーションを表示" releaseToRefresh: "離してリロード" refreshing: "リロード中" pullDownToRefresh: "引っ張ってリロード" -disableWebSocket: "タイムラインのリアルタイム更新を無効にする" +disableStreamingTimeline: "タイムラインのリアルタイム更新を無効にする" _announcement: forExistingUsers: "既存ユーザーのみ" diff --git a/packages/frontend/src/components/MkTimeline.vue b/packages/frontend/src/components/MkTimeline.vue index b844fd7e78..98b7f441e2 100644 --- a/packages/frontend/src/components/MkTimeline.vue +++ b/packages/frontend/src/components/MkTimeline.vue @@ -181,7 +181,7 @@ if (props.src === 'antenna') { }; } -if (!defaultStore.state.disableWebSocket) { +if (!defaultStore.state.disableStreamingTimeline) { connectChannel(); onUnmounted(() => { diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index 311da709cb..65ee320e1b 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -151,7 +151,7 @@ SPDX-License-Identifier: AGPL-3.0-only {{ i18n.ts.openImageInNewTab }} {{ i18n.ts.enableInfiniteScroll }} {{ i18n.ts.keepScreenOn }} - {{ i18n.ts.disableWebSocket }} + {{ i18n.ts.disableStreamingTimeline }} @@ -254,7 +254,7 @@ const notificationPosition = computed(defaultStore.makeGetterSetter('notificatio const notificationStackAxis = computed(defaultStore.makeGetterSetter('notificationStackAxis')); const keepScreenOn = computed(defaultStore.makeGetterSetter('keepScreenOn')); const defaultWithReplies = computed(defaultStore.makeGetterSetter('defaultWithReplies')); -const disableWebSocket = computed(defaultStore.makeGetterSetter('disableWebSocket')); +const disableStreamingTimeline = computed(defaultStore.makeGetterSetter('disableStreamingTimeline')); watch(lang, () => { miLocalStorage.setItem('lang', lang.value as string); @@ -291,7 +291,7 @@ watch([ reactionsDisplaySize, highlightSensitiveMedia, keepScreenOn, - disableWebSocket, + disableStreamingTimeline, ], async () => { await reloadAsk(); }); diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index 45f66ed6cf..803f2f648d 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -369,7 +369,7 @@ export const defaultStore = markRaw(new Storage('base', { where: 'account', default: false, }, - disableWebSocket: { + disableStreamingTimeline: { where: 'device', default: false, },