Add replies/reblogs/favourites count to statuses

This commit is contained in:
niu tech 2023-07-10 20:23:27 +02:00 committed by GitHub
parent 5d61e6d0c6
commit bc22b54e4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -8,6 +8,7 @@
href={replyIcon}
clickListener={false}
elementId={replyKey}
count={repliesCount}
/>
<IconButton
label={reblogLabel}
@ -19,6 +20,7 @@
href={reblogIcon}
clickListener={false}
elementId={reblogKey}
count={reblogsCount}
ref:reblogIcon
/>
<IconButton
@ -30,6 +32,7 @@
href="#fa-star"
clickListener={false}
elementId={favoriteKey}
count={favoritesCount}
ref:favoriteIcon
/>
<IconButton
@ -229,7 +232,10 @@
favoriteKey: ({ uuid }) => `fav-${uuid}`,
reblogKey: ({ uuid }) => `reblog-${uuid}`,
replyKey: ({ uuid }) => `reply-${uuid}`,
optionsKey: ({ uuid }) => `options-${uuid}`
optionsKey: ({ uuid }) => `options-${uuid}`,
repliesCount: ({ originalStatus }) => originalStatus.replies_count,
reblogsCount: ({ originalStatus }) => originalStatus.reblogs_count,
favoritesCount: ({ originalStatus }) => originalStatus.favourites_count
}
}
</script>