From bdfe70931995e7ec79c2ec399b2a00c095692b21 Mon Sep 17 00:00:00 2001 From: syuilo <4439005+syuilo@users.noreply.github.com> Date: Wed, 20 Aug 2025 15:57:20 +0900 Subject: fix(frontend): 読み込み直後にプラグインによるノートの書き換えが行われない問題を修正 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ブート時にプラグインがロードされるまで待機 Fix #16428 --- packages/frontend/src/boot/common.ts | 7 +++++++ packages/frontend/src/boot/main-boot.ts | 5 +---- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'packages/frontend/src/boot') diff --git a/packages/frontend/src/boot/common.ts b/packages/frontend/src/boot/common.ts index 395d1e5e7e..574012ff78 100644 --- a/packages/frontend/src/boot/common.ts +++ b/packages/frontend/src/boot/common.ts @@ -29,6 +29,7 @@ import { miLocalStorage } from '@/local-storage.js'; import { fetchCustomEmojis } from '@/custom-emojis.js'; import { prefer } from '@/preferences.js'; import { $i } from '@/i.js'; +import { launchPlugins } from '@/plugin.js'; export async function common(createVue: () => Promise>) { console.info(`Misskey v${version}`); @@ -338,6 +339,12 @@ export async function common(createVue: () => Promise>) { }); } + try { + await launchPlugins(); + } catch (error) { + console.error('Failed to launch plugins:', error); + } + app.mount(rootEl); // boot.jsのやつを解除 diff --git a/packages/frontend/src/boot/main-boot.ts b/packages/frontend/src/boot/main-boot.ts index 46e690a55f..6ae8379801 100644 --- a/packages/frontend/src/boot/main-boot.ts +++ b/packages/frontend/src/boot/main-boot.ts @@ -26,7 +26,6 @@ import { mainRouter } from '@/router.js'; import { makeHotkey } from '@/utility/hotkey.js'; import { addCustomEmoji, removeCustomEmojis, updateCustomEmojis } from '@/custom-emojis.js'; import { prefer } from '@/preferences.js'; -import { launchPlugins } from '@/plugin.js'; import { updateCurrentAccountPartial } from '@/accounts.js'; import { migrateOldSettings } from '@/pref-migrate.js'; import { unisonReload } from '@/utility/unison-reload.js'; @@ -79,8 +78,6 @@ export async function mainBoot() { } } - launchPlugins(); - try { if (prefer.s.enableSeasonalScreenEffect) { const month = new Date().getMonth() + 1; @@ -421,7 +418,7 @@ export async function mainBoot() { } }, allowRepeat: true, - } + }, } as const satisfies Keymap; window.document.addEventListener('keydown', makeHotkey(keymap), { passive: false }); -- cgit v1.2.3-freya