From c371af34e877845e01cd92683aca0ff3334e314a Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Mon, 31 Mar 2025 14:53:02 -0400 Subject: copy sharkey settings into new frontend preferences model --- packages/frontend/src/utility/boost-quote.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'packages/frontend/src/utility/boost-quote.ts') diff --git a/packages/frontend/src/utility/boost-quote.ts b/packages/frontend/src/utility/boost-quote.ts index feb949772b..b5d2c7e6fe 100644 --- a/packages/frontend/src/utility/boost-quote.ts +++ b/packages/frontend/src/utility/boost-quote.ts @@ -3,11 +3,13 @@ * SPDX-License-Identifier: AGPL-3.0-only */ -import { ref, Ref, computed, ComputedRef } from 'vue'; +import { ref, computed } from 'vue'; import * as Misskey from 'misskey-js'; +import type { Ref, ComputedRef } from 'vue'; +import type { MenuItem } from '@/types/menu.js'; import { i18n } from '@/i18n.js'; -import { defaultStore } from '@/store.js'; -import { MenuItem } from '@/types/menu.js'; +import { prefer } from '@/preferences'; +import { store } from '@/store.js'; /* this script should eventually contain all Sharkey-specific bits of @@ -30,7 +32,7 @@ export function visibilityIsAtLeast(a: Visibility | string, b: Visibility | stri } export function boostMenuItems(appearNote: Ref, renote: (v: Visibility, l: boolean) => void): MenuItem[] { - const localOnly = ref(defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly); + const localOnly = ref(prefer.s.rememberNoteVisibility ? store.s.localOnly : prefer.s.defaultNoteLocalOnly); const effectiveVisibility = ( appearNote.value.channel?.isSensitive ? smallerVisibility(appearNote.value.visibility, 'home') @@ -83,7 +85,7 @@ export function boostMenuItems(appearNote: Ref, renote: ( export function computeRenoteTooltip(renoted: Ref): ComputedRef { return computed(() => { if (renoted.value) return i18n.ts.unrenote; - if (defaultStore.state.showVisibilitySelectorOnBoost) return i18n.ts.renote; + if (prefer.s.showVisibilitySelectorOnBoost) return i18n.ts.renote; return i18n.ts.renoteShift; }); } -- cgit v1.2.3-freya