summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts
diff options
context:
space:
mode:
authorかっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>2024-05-27 17:19:09 +0900
committerGitHub <noreply@github.com>2024-05-27 17:19:09 +0900
commitd013e4516d7afb6ed4362467f69df2d79b9f0f9f (patch)
tree295bb73c34e6ade1e96831d91fb17a995eaed191 /packages/frontend/src/scripts
parentenhance(backend): プロフィールのリンク検証にtry-catchを追加 (... (diff)
downloadsharkey-d013e4516d7afb6ed4362467f69df2d79b9f0f9f.tar.gz
sharkey-d013e4516d7afb6ed4362467f69df2d79b9f0f9f.tar.bz2
sharkey-d013e4516d7afb6ed4362467f69df2d79b9f0f9f.zip
enhance(frontend): お気に入りチャンネルをキャッシュするように (#13881)
Diffstat (limited to 'packages/frontend/src/scripts')
-rw-r--r--packages/frontend/src/scripts/get-note-menu.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/packages/frontend/src/scripts/get-note-menu.ts b/packages/frontend/src/scripts/get-note-menu.ts
index e7c9a848e0..71ad299f50 100644
--- a/packages/frontend/src/scripts/get-note-menu.ts
+++ b/packages/frontend/src/scripts/get-note-menu.ts
@@ -16,7 +16,7 @@ import { url } from '@/config.js';
import { defaultStore, noteActions } from '@/store.js';
import { miLocalStorage } from '@/local-storage.js';
import { getUserMenu } from '@/scripts/get-user-menu.js';
-import { clipsCache } from '@/cache.js';
+import { clipsCache, favoritedChannelsCache } from '@/cache.js';
import { MenuItem } from '@/types/menu.js';
import MkRippleEffect from '@/components/MkRippleEffect.vue';
import { isSupportShare } from '@/scripts/navigator.js';
@@ -603,9 +603,7 @@ export function getRenoteMenu(props: {
icon: 'ti ti-repeat',
text: appearNote.channel ? i18n.ts.renoteToOtherChannel : i18n.ts.renoteToChannel,
children: async () => {
- const channels = await misskeyApi('channels/my-favorites', {
- limit: 30,
- });
+ const channels = await favoritedChannelsCache.fetch();
return channels.filter((channel) => {
if (!appearNote.channelId) return true;
return channel.id !== appearNote.channelId;