diff options
| author | dakkar <dakkar@thenautilus.net> | 2024-06-26 19:57:45 +0000 |
|---|---|---|
| committer | dakkar <dakkar@thenautilus.net> | 2024-06-26 19:57:45 +0000 |
| commit | dc4f6c8016ccece79f8f2b75a5378c643e884f0b (patch) | |
| tree | 3e2c9e998a2f97244a37f3f8cb7f1831e4108ab7 /packages/frontend/src/scripts/use-note-capture.ts | |
| parent | merge: Release 2024.3.3 (!501) (diff) | |
| parent | merge: parse `notRespondingSince` from redis instance cache (!560) (diff) | |
| download | sharkey-dc4f6c8016ccece79f8f2b75a5378c643e884f0b.tar.gz sharkey-dc4f6c8016ccece79f8f2b75a5378c643e884f0b.tar.bz2 sharkey-dc4f6c8016ccece79f8f2b75a5378c643e884f0b.zip | |
merge: release 2024.5.0 (!556)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/556
Approved-by: Tess K <me@thvxl.se>
Diffstat (limited to 'packages/frontend/src/scripts/use-note-capture.ts')
| -rw-r--r-- | packages/frontend/src/scripts/use-note-capture.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/frontend/src/scripts/use-note-capture.ts b/packages/frontend/src/scripts/use-note-capture.ts index 3baa45d50f..1b3626bff5 100644 --- a/packages/frontend/src/scripts/use-note-capture.ts +++ b/packages/frontend/src/scripts/use-note-capture.ts @@ -54,6 +54,7 @@ export function useNoteCapture(props: { const currentCount = (note.value.reactions || {})[reaction] || 0; note.value.reactions[reaction] = currentCount + 1; + note.value.reactionCount += 1; if ($i && (body.userId === $i.id)) { note.value.myReaction = reaction; @@ -68,6 +69,7 @@ export function useNoteCapture(props: { const currentCount = (note.value.reactions || {})[reaction] || 0; note.value.reactions[reaction] = Math.max(0, currentCount - 1); + note.value.reactionCount = Math.max(0, note.value.reactionCount - 1); if (note.value.reactions[reaction] === 0) delete note.value.reactions[reaction]; if ($i && (body.userId === $i.id)) { |