From ffec31448260cb4bfb6be47a35d3faf31a67a503 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Tue, 28 May 2024 17:27:38 +0900 Subject: [PATCH] use cache --- packages/frontend/src/components/MkVisibilityPicker.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/frontend/src/components/MkVisibilityPicker.vue b/packages/frontend/src/components/MkVisibilityPicker.vue index 429355eb5f..c54cd59682 100644 --- a/packages/frontend/src/components/MkVisibilityPicker.vue +++ b/packages/frontend/src/components/MkVisibilityPicker.vue @@ -66,7 +66,7 @@ import type { MenuItem } from '@/types/menu.js'; import MkModal from '@/components/MkModal.vue'; import { i18n } from '@/i18n.js'; import * as os from '@/os.js'; -import { misskeyApi } from '@/scripts/misskey-api.js'; +import { favoritedChannelsCache } from '@/cache.js'; const modal = shallowRef>(); const channelsButton = shallowRef>(); @@ -105,9 +105,7 @@ const currentChannel = ref(props.currentCh const currentChannelName = computed(() => currentChannel.value?.name ?? null); async function fetchChannels() { - const res = await misskeyApi('channels/my-favorites', { - limit: 100, - }); + const res = await favoritedChannelsCache.fetch(); channels.value.splice(0, 0, ...res); }