From ce83648f9da3a93018fc7845bec1d35c1519028d Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Fri, 22 Jul 2022 12:32:52 -0500 Subject: Add liked-by and reposted-by views --- src/view/com/post-thread/PostThreadItem.tsx | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'src/view/com/post-thread/PostThreadItem.tsx') diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index 896eab89f..7263c61b3 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -40,6 +40,20 @@ export const PostThreadItem = observer(function PostThreadItem({ name: item.author.name, }) } + const onPressLikes = () => { + const urip = new AdxUri(item.uri) + onNavigateContent('PostLikedBy', { + name: item.author.name, + recordKey: urip.recordKey, + }) + } + const onPressReposts = () => { + const urip = new AdxUri(item.uri) + onNavigateContent('PostRepostedBy', { + name: item.author.name, + recordKey: urip.recordKey, + }) + } const onPressToggleRepost = () => { item .toggleRepost() @@ -91,7 +105,9 @@ export const PostThreadItem = observer(function PostThreadItem({ {item._isHighlightedPost && hasEngagement ? ( {item.repostCount ? ( - + {item.repostCount}{' '} {pluralize(item.repostCount, 'repost')} @@ -99,7 +115,9 @@ export const PostThreadItem = observer(function PostThreadItem({ <> )} {item.likeCount ? ( - + {item.likeCount}{' '} {pluralize(item.likeCount, 'like')} -- cgit 1.4.1