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,13 +95,11 @@
class="button"
:note="appearNote"
:count="
Number(
magTransProperty(
appearNote,
'renote_count',
'renoteCount'
)
)
"
/>
<XStarButtonNoEmoji

View File

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

View File

@ -195,7 +195,7 @@ export function magReactionToLegacy(reaction: types.Reaction | string): string {
if (reaction.host) {
return `:${reaction.name}@${reaction.host}:`;
} 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(
note.value.reactions,
reactionType