Frontend: Fixed more reaction bugs
ci/woodpecker/push/ociImagePush Pipeline was successful Details

This commit is contained in:
Natty 2023-11-06 02:54:02 +01:00
parent cb645ef0f6
commit e53e274d1d
Signed by: natty
GPG Key ID: BF6CB659ADEE60EC
4 changed files with 11 additions and 12 deletions

View File

@ -95,12 +95,10 @@
class="button" class="button"
:note="appearNote" :note="appearNote"
:count=" :count="
Number( magTransProperty(
magTransProperty( appearNote,
appearNote, 'renote_count',
'renote_count', 'renoteCount'
'renoteCount'
)
) )
" "
/> />

View File

@ -59,10 +59,8 @@ const hasRenotedBefore = ref<boolean>(
const canRenote = computed( const canRenote = computed(
() => () =>
["public", "home"].includes(props.note.visibility) || ["public", "home", "Public", "Home"].includes(props.note.visibility) ||
($i && ($i && props.note.user.id === $i.id)
magTransMap(props.note, "user", "userId", (user) => user.id) ===
$i.id)
); );
useTooltip(buttonRef, async (showing) => { useTooltip(buttonRef, async (showing) => {

View File

@ -195,7 +195,7 @@ export function magReactionToLegacy(reaction: types.Reaction | string): string {
if (reaction.host) { if (reaction.host) {
return `:${reaction.name}@${reaction.host}:`; return `:${reaction.name}@${reaction.host}:`;
} else { } else {
return `:${reaction.name}@.:`; return `:${reaction.name}:`;
} }
} }

View File

@ -45,7 +45,10 @@ export function useNoteCapture(props: {
} }
} }
const reactionType = magConvertReaction(reaction); const reactionType = magConvertReaction(
reaction,
body?.emoji?.url
);
const foundReaction = magReactionIndex( const foundReaction = magReactionIndex(
note.value.reactions, note.value.reactions,
reactionType reactionType