diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-08-06 13:32:59 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-08-06 13:32:59 +0900 |
| commit | 998beeae59bbe9c272e3248b29b89a07259a3624 (patch) | |
| tree | 4b209b8b18b0aac8d94afa906b976e1d30f5c96d /packages/frontend/src/components/MkNote.vue | |
| parent | 🎨 (diff) | |
| download | misskey-998beeae59bbe9c272e3248b29b89a07259a3624.tar.gz misskey-998beeae59bbe9c272e3248b29b89a07259a3624.tar.bz2 misskey-998beeae59bbe9c272e3248b29b89a07259a3624.zip | |
feat(frontend): AiScriptを1.0に更新
Close #16277
Diffstat (limited to 'packages/frontend/src/components/MkNote.vue')
| -rw-r--r-- | packages/frontend/src/components/MkNote.vue | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index b9cb37e99a..043af4cc96 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -265,21 +265,19 @@ const currentClip = inject<Ref<Misskey.entities.Clip> | null>('currentClip', nul let note = deepClone(props.note); -// コンポーネント初期化に非同期的な処理を行うとTransitionのレンダリングがバグるため同期的に実行できるメソッドが実装されるのを待つ必要がある -// https://github.com/aiscript-dev/aiscript/issues/937 -//// plugin -//const noteViewInterruptors = getPluginHandlers('note_view_interruptor'); -//if (noteViewInterruptors.length > 0) { -// let result: Misskey.entities.Note | null = deepClone(note); -// for (const interruptor of noteViewInterruptors) { -// try { -// result = await interruptor.handler(result!) as Misskey.entities.Note | null; -// } catch (err) { -// console.error(err); -// } -// } -// note = result as Misskey.entities.Note; -//} +// plugin +const noteViewInterruptors = getPluginHandlers('note_view_interruptor'); +if (noteViewInterruptors.length > 0) { + let result: Misskey.entities.Note | null = deepClone(note); + for (const interruptor of noteViewInterruptors) { + try { + result = interruptor.handler(result!) as Misskey.entities.Note | null; + } catch (err) { + console.error(err); + } + } + note = result as Misskey.entities.Note; +} const isRenote = Misskey.note.isPureRenote(note); const appearNote = getAppearNote(note) ?? note; |