diff --git a/packages/frontend/src/components/MkReactionsViewer.reaction.vue b/packages/frontend/src/components/MkReactionsViewer.reaction.vue index 5387f490a1a3828570d1c79d81734f37e4aff932..8f2f48dcd775598bfec94a1d9f743b09e9fc48e5 100644 --- a/packages/frontend/src/components/MkReactionsViewer.reaction.vue +++ b/packages/frontend/src/components/MkReactionsViewer.reaction.vue @@ -1,6 +1,5 @@ <template> <button - v-if="count > 0" ref="buttonRef" v-ripple="canToggle" class="hkzvhatu _button" diff --git a/packages/frontend/src/components/MkReactionsViewer.vue b/packages/frontend/src/components/MkReactionsViewer.vue index a22f7b6e7463f6e6cfa032ec5bfbbaab901ade4a..aa4608f849a253a45b0f9654fbaf0fdc82c32259 100644 --- a/packages/frontend/src/components/MkReactionsViewer.vue +++ b/packages/frontend/src/components/MkReactionsViewer.vue @@ -1,10 +1,8 @@ <template> <Transition :name="$store.state.animation ? 'y' : ''"> -<div v-if="Object.keys(note.reactions).length > 0" class="tdflqwzn" :class="{ isMe }"> - <TransitionGroup :name="$store.state.animation ? 'x' : ''"> + <TransitionGroup v-if="Object.keys(note.reactions).length > 0" :name="$store.state.animation ? 'x' : ''" tag="div" class="tdflqwzn" :class="{ isMe }"> <XReaction v-for="(count, reaction) in note.reactions" :key="reaction" :reaction="reaction" :count="count" :is-initial="initialReactions.has(reaction)" :note="note"/> </TransitionGroup> -</div> </Transition> </template> diff --git a/packages/frontend/src/scripts/use-note-capture.ts b/packages/frontend/src/scripts/use-note-capture.ts index e6bdb345c4ee778b935304ff52c48f075e02e617..389ee1256132618dbff60ea899dc6e78a1b8231a 100644 --- a/packages/frontend/src/scripts/use-note-capture.ts +++ b/packages/frontend/src/scripts/use-note-capture.ts @@ -45,6 +45,7 @@ export function useNoteCapture(props: { const currentCount = (note.value.reactions || {})[reaction] || 0; note.value.reactions[reaction] = Math.max(0, currentCount - 1); + if (note.value.reactions[reaction] === 0) delete note.value.reactions[reaction]; if ($i && (body.userId === $i.id)) { note.value.myReaction = null;