diff --git a/packages/frontend/src/custom-emojis.ts b/packages/frontend/src/custom-emojis.ts index 637ee9c06..a7ac4e03c 100644 --- a/packages/frontend/src/custom-emojis.ts +++ b/packages/frontend/src/custom-emojis.ts @@ -9,8 +9,6 @@ export let customEmojis: { url: string; }[] = storageCache ? JSON.parse(storageCache) : []; -fetchCustomEmojis(); - export async function fetchCustomEmojis() { const now = Date.now(); const lastFetchedAt = miLocalStorage.getItem('lastEmojisFetchedAt'); diff --git a/packages/frontend/src/init.ts b/packages/frontend/src/init.ts index d90d3b553..079003ee8 100644 --- a/packages/frontend/src/init.ts +++ b/packages/frontend/src/init.ts @@ -45,6 +45,7 @@ import { getUrlWithoutLoginId } from '@/scripts/login-id'; import { getAccountFromId } from '@/scripts/get-account-from-id'; import { miLocalStorage } from './local-storage'; import { claimAchievement, claimedAchievements } from './scripts/achievements'; +import { fetchCustomEmojis } from './custom-emojis'; (async () => { console.info(`Misskey v${version}`); @@ -178,6 +179,10 @@ import { claimAchievement, claimedAchievements } from './scripts/achievements'; initializeSw(); }); + try { + await fetchCustomEmojis(); + } catch (err) {} + const app = createApp( window.location.search === '?zen' ? defineAsyncComponent(() => import('@/ui/zen.vue')) : !$i ? defineAsyncComponent(() => import('@/ui/visitor.vue')) :