emoji more

This commit is contained in:
mattyatea 2024-06-20 13:48:44 +09:00
parent bba25036fa
commit a64c607584
10 changed files with 158 additions and 130 deletions

View file

@ -39,6 +39,13 @@ export function useNoteCapture(props: {
if ($i && (body.userId === $i.id)) {
note.value.myReaction = reaction;
console.log(note.value.myReactions);
if (!note.value.myReactions) {
note.value.myReactions = [];
note.value.myReactions.push(reaction);
} else if (!note.value.myReactions.includes(reaction)) {
note.value.myReactions.push(reaction);
}
}
break;
}
@ -55,6 +62,7 @@ export function useNoteCapture(props: {
if ($i && (body.userId === $i.id)) {
note.value.myReaction = null;
note.value.myReactions = note.value.myReactions.filter(r => r !== reaction);
}
break;
}