diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2022-12-30 19:01:01 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2022-12-30 19:01:01 +0900 |
| commit | 2d89741afb0a4d4ebaf2bfeb597e6299998bd0a0 (patch) | |
| tree | 3445c67481b71462f3fa6d0297e4d87b32148a9e /packages/frontend | |
| parent | :art: (diff) | |
| download | misskey-2d89741afb0a4d4ebaf2bfeb597e6299998bd0a0.tar.gz misskey-2d89741afb0a4d4ebaf2bfeb597e6299998bd0a0.tar.bz2 misskey-2d89741afb0a4d4ebaf2bfeb597e6299998bd0a0.zip | |
ReactionsViewerが消えることがある問題を修正
Diffstat (limited to 'packages/frontend')
3 files changed, 2 insertions, 4 deletions
diff --git a/packages/frontend/src/components/MkReactionsViewer.reaction.vue b/packages/frontend/src/components/MkReactionsViewer.reaction.vue index 5387f490a1..8f2f48dcd7 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 a22f7b6e74..aa4608f849 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 e6bdb345c4..389ee12561 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; |