diff --git a/src/screens/PostDetailScreen.tsx b/src/screens/PostDetailScreen.tsx index 2d89b93..e2820d4 100644 --- a/src/screens/PostDetailScreen.tsx +++ b/src/screens/PostDetailScreen.tsx @@ -413,6 +413,25 @@ export function PostDetailScreen({ } }, [currentLink]); + // Click handlers for like/bookmark icons + const handleLikeClick = useCallback( + (event: MouseEvent) => { + if (event.type === "up" && event.button === 0) { + onLike?.(); + } + }, + [onLike] + ); + + const handleBookmarkClick = useCallback( + (event: MouseEvent) => { + if (event.type === "up" && event.button === 0) { + onBookmark?.(); + } + }, + [onBookmark] + ); + useKeyboard((key) => { if (!focused) return; @@ -730,7 +749,18 @@ export function PostDetailScreen({ ) : null; - // Stats bar + // Stats bar with clickable like/bookmark icons + const likeColor = isJustLiked + ? colors.success + : isLiked + ? colors.liked + : colors.muted; + const bookmarkColor = isJustBookmarked + ? colors.success + : isBookmarked + ? colors.bookmarked + : colors.muted; + const statsContent = ( @@ -739,6 +769,14 @@ export function PostDetailScreen({ {formatCount(tweet.retweetCount)} reposts {" "} {formatCount(tweet.likeCount)} likes + {" "} + + {isLiked ? HEART_FILLED : HEART_EMPTY} + + {" "} + + {isBookmarked ? FLAG_FILLED : FLAG_EMPTY} + );