Skip to content
Snippets Groups Projects
Commit 2d89741a authored by syuilo's avatar syuilo
Browse files

ReactionsViewerが消えることがある問題を修正

parent c631e14e
No related branches found
No related tags found
No related merge requests found
<template>
<button
v-if="count > 0"
ref="buttonRef"
v-ripple="canToggle"
class="hkzvhatu _button"
......
<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>
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment