diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-05-31 07:05:52 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-31 05:05:52 +0100 |
commit | 8569e2e389e756ec2df6c547e894689500d1c111 (patch) | |
tree | 23891ddb375fd5d9e97e24286ac11fc8bd24914e /src/view/com/post/Post.tsx | |
parent | 9879159438b9deec811f30f07f41839321495f73 (diff) | |
download | voidsky-8569e2e389e756ec2df6c547e894689500d1c111.tar.zst |
Add follow button to feed item avatar (#3560)
* add follow button to feed item avatar * remove confirmation * add confirmation (just system alert) * Shrink the avi follow indicator a smidge * gate the follow button * remove from your own posts * add to post thread item * hide the follow button locally to component * Use native dropdown * Add follow btn to notifications and search * UI tweaks * Hide on PWI * Add toast for confirmation * Check gate last * compiler * Rm unused * Use names --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Diffstat (limited to 'src/view/com/post/Post.tsx')
-rw-r--r-- | src/view/com/post/Post.tsx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/view/com/post/Post.tsx b/src/view/com/post/Post.tsx index 1a7185cd9..f666e2968 100644 --- a/src/view/com/post/Post.tsx +++ b/src/view/com/post/Post.tsx @@ -22,6 +22,7 @@ import {makeProfileLink} from 'lib/routes/links' import {countLines} from 'lib/strings/helpers' import {colors, s} from 'lib/styles' import {precacheProfile} from 'state/queries/profile' +import {AviFollowButton} from '#/view/com/posts/AviFollowButton' import {atoms as a} from '#/alf' import {ProfileHoverCard} from '#/components/ProfileHoverCard' import {RichText} from '#/components/RichText' @@ -146,12 +147,14 @@ function PostInner({ {showReplyLine && <View style={styles.replyLine} />} <View style={styles.layout}> <View style={styles.layoutAvi}> - <PreviewableUserAvatar - size={52} - profile={post.author} - moderation={moderation.ui('avatar')} - type={post.author.associated?.labeler ? 'labeler' : 'user'} - /> + <AviFollowButton author={post.author} moderation={moderation}> + <PreviewableUserAvatar + size={52} + profile={post.author} + moderation={moderation.ui('avatar')} + type={post.author.associated?.labeler ? 'labeler' : 'user'} + /> + </AviFollowButton> </View> <View style={styles.layoutContent}> <PostMeta @@ -245,9 +248,9 @@ const styles = StyleSheet.create({ }, layout: { flexDirection: 'row', + gap: 10, }, layoutAvi: { - width: 70, paddingLeft: 8, }, layoutContent: { |