summaryrefslogtreecommitdiff
path: root/packages/client/src/components
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-03-05 01:23:34 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2022-03-05 01:23:34 +0900
commit5431b5124902deb577bd3bc08e637ba5a15ccdd1 (patch)
tree7a5b101ba839f0e6c9de8c4d941b27a045c4f5e2 /packages/client/src/components
parentfix(client): register_note_view_interruptor()が動かないのを修正 (diff)
downloadmisskey-5431b5124902deb577bd3bc08e637ba5a15ccdd1.tar.gz
misskey-5431b5124902deb577bd3bc08e637ba5a15ccdd1.tar.bz2
misskey-5431b5124902deb577bd3bc08e637ba5a15ccdd1.zip
fix
Diffstat (limited to 'packages/client/src/components')
-rw-r--r--packages/client/src/components/note-detailed.vue15
1 files changed, 13 insertions, 2 deletions
diff --git a/packages/client/src/components/note-detailed.vue b/packages/client/src/components/note-detailed.vue
index 80233d608a..d30284ca5f 100644
--- a/packages/client/src/components/note-detailed.vue
+++ b/packages/client/src/components/note-detailed.vue
@@ -154,7 +154,18 @@ const props = defineProps<{
const inChannel = inject('inChannel', null);
-const note = $ref(JSON.parse(JSON.stringify(props.note)));
+let note = $ref(JSON.parse(JSON.stringify(props.note)));
+
+// plugin
+if (noteViewInterruptors.length > 0) {
+ onMounted(async () => {
+ let result = JSON.parse(JSON.stringify(note));
+ for (const interruptor of noteViewInterruptors) {
+ result = await interruptor.handler(result);
+ }
+ note = result;
+ });
+}
const isRenote = (
note.renote != null &&
@@ -168,7 +179,7 @@ const menuButton = ref<HTMLElement>();
const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
const renoteTime = ref<HTMLElement>();
const reactButton = ref<HTMLElement>();
-let appearNote = $ref(isRenote ? note.renote as misskey.entities.Note : note);
+let appearNote = $computed(() => isRenote ? note.renote as misskey.entities.Note : note);
const isMyRenote = $i && ($i.id === note.userId);
const showContent = ref(false);
const isDeleted = ref(false);