Frontend: Fixed reactions overriding the self reaction flag
ci/woodpecker/push/ociImagePush Pipeline was successful Details

This commit is contained in:
Natty 2023-11-15 01:16:34 +01:00
parent 79660fb816
commit e2cab2aa9b
Signed by: natty
GPG Key ID: BF6CB659ADEE60EC
1 changed files with 6 additions and 3 deletions

View File

@ -39,10 +39,13 @@ export function useNoteCapture(props: {
const selfReact = ($i && body.userId === $i.id) || false; const selfReact = ($i && body.userId === $i.id) || false;
if (foundReaction >= 0) { if (foundReaction >= 0) {
const [reaction, cnt, selfReactPrev] = toRaw(
note.value.reactions[foundReaction]
);
note.value.reactions[foundReaction] = [ note.value.reactions[foundReaction] = [
toRaw(note.value.reactions[foundReaction][0]), reaction,
note.value.reactions[foundReaction][1] + 1, cnt + 1,
selfReact, selfReactPrev || selfReact,
]; ];
} else { } else {
note.value.reactions.push([reactionType, 1, selfReact]); note.value.reactions.push([reactionType, 1, selfReact]);