This repository was archived by the owner on Feb 23, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed
Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -852,10 +852,10 @@ function undoReact(targetNote: Misskey.entities.Note): void {
852852}
853853
854854function toggleReact() {
855- if ($appearNote .myReaction == null ) {
855+ console .log ($appearNote .myReactions ?.length );
856+ if ($appearNote .myReactions ?.length < 3 ||
857+ ($appearNote .myReaction && appearNote .user .host )) {
856858 react ();
857- } else {
858- undoReact (appearNote );
859859 }
860860}
861861
Original file line number Diff line number Diff line change @@ -23,8 +23,10 @@ SPDX-License-Identifier: AGPL-3.0-only
2323 @contextmenu.prevent.stop =" menu"
2424>
2525 <MkReactionIcon
26- style =" pointer-events : none ;" :class =" limitWidthOfReaction ? $style.limitWidth : ''" :reaction =" reaction" :emojiUrl =" reactionEmojis[reaction.substring(1, reaction.length - 1)]" />
27- <span :class =" [
26+ style =" pointer-events : none ;" :class =" limitWidthOfReaction ? $style.limitWidth : ''" :reaction =" reaction" :emojiUrl =" reactionEmojis[reaction.substring(1, reaction.length - 1)]"
27+ />
28+ <span
29+ :class =" [
2830 $style.count,
2931 {
3032 [$style.gamingDark]: gamingType === 'dark',
@@ -127,7 +129,7 @@ async function toggleReaction() {
127129
128130 // Check if already reacted using the same logic as isReacted
129131 const alreadyReacted = props .note .myReactions ?.includes (props .reaction ) ?? false ;
130-
132+
131133 if (alreadyReacted ) {
132134 const confirm = await os .confirm ({
133135 type: ' warning' ,
@@ -141,7 +143,7 @@ async function toggleReaction() {
141143 }
142144
143145 // Note: The myReactions array will be updated by the noteEvents handler in use-note-capture.ts
144-
146+
145147 misskeyApi (' notes/reactions/delete' , {
146148 noteId: props .noteId ,
147149 reaction: props .reaction ,
Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ export function useNoteCapture(props: {
3939
4040 if ( $i && ( body . userId === $i . id ) ) {
4141 note . value . myReaction = reaction ;
42- console . log ( note . value . myReactions ) ;
4342 if ( ! note . value . myReactions ) {
4443 note . value . myReactions = [ ] ;
4544 note . value . myReactions . push ( reaction ) ;
@@ -62,7 +61,7 @@ export function useNoteCapture(props: {
6261
6362 if ( $i && ( body . userId === $i . id ) ) {
6463 note . value . myReaction = null ;
65- note . value . myReactions = note . value . myReactions . filter ( r => r !== reaction ) ;
64+ note . value . myReactions = note . value . myReactions ? .filter ( r => r !== reaction ) ;
6665 }
6766 break ;
6867 }
You can’t perform that action at this time.
0 commit comments