tweak fetchCustomEmojis timing

This commit is contained in:
syuilo 2023-01-21 20:53:11 +09:00
parent 3e112da486
commit 307a882649
2 changed files with 5 additions and 2 deletions

View file

@ -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');

View file

@ -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')) :