From ddf31c392a91311ed62c087cef1b1f9977906686 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Wed, 1 Nov 2023 01:45:57 +0900 Subject: [PATCH] (fix) reactionViewer error --- packages/frontend/src/components/MkNote.vue | 10 +++++++++- .../components/MkReactionsViewer.reaction.vue | 16 +++++++++++++++- .../src/components/MkReactionsViewer.vue | 15 ++++++++++++++- .../src/components/MkTutorialDialog.Note.vue | 2 +- 4 files changed, 39 insertions(+), 4 deletions(-) diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index 0319eb61d6..122d29eff3 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -84,7 +84,7 @@ SPDX-License-Identifier: AGPL-3.0-only {{ appearNote.channel.name }} - + @@ -545,6 +545,14 @@ function readPromo() { }); isDeleted.value = true; } + +function emitUpdReaction(emoji: string, delta: number) { + if (delta < 0) { + emit('removeReaction', emoji); + } else if (delta > 0) { + emit('reaction', emoji); + } +}