diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-10-31 17:23:47 -0500 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-10-31 17:23:47 -0500 |
commit | fd6a2b1b40de0827283777ea6e4c67e2d72e95d8 (patch) | |
tree | 47be9da4516694b34028555b27e68a120dacdf52 /src/view/com/post-thread/PostThreadItem.tsx | |
parent | eceef67d466007155718c93e6c2fe2b1afa53175 (diff) | |
download | voidsky-fd6a2b1b40de0827283777ea6e4c67e2d72e95d8.tar.zst |
Switch to autogenerated avis for now
Diffstat (limited to 'src/view/com/post-thread/PostThreadItem.tsx')
-rw-r--r-- | src/view/com/post-thread/PostThreadItem.tsx | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index e8fdd91af..4f0683f09 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -10,9 +10,9 @@ import {ComposePostModel} from '../../../state/models/shell' import {Link} from '../util/Link' import {RichText} from '../util/RichText' import {PostDropdownBtn} from '../util/DropdownBtn' +import {UserAvatar} from '../util/UserAvatar' import {s, colors} from '../../lib/styles' import {ago, pluralize} from '../../lib/strings' -import {DEF_AVATER} from '../../lib/assets' import {useStores} from '../../../state' const PARENT_REPLY_LINE_LENGTH = 8 @@ -116,7 +116,11 @@ export const PostThreadItem = observer(function PostThreadItem({ <View style={styles.outer}> <View style={styles.layout}> <Link style={styles.layoutAvi} href={authorHref} title={authorTitle}> - <Image style={styles.avi} source={DEF_AVATER} /> + <UserAvatar + size={50} + displayName={item.author.displayName} + name={item.author.name} + /> </Link> <View style={styles.layoutContent}> <View style={[styles.meta, s.mt5]}> @@ -231,7 +235,11 @@ export const PostThreadItem = observer(function PostThreadItem({ )} <View style={styles.layout}> <Link style={styles.layoutAvi} href={authorHref} title={authorTitle}> - <Image style={styles.avi} source={DEF_AVATER} /> + <UserAvatar + size={50} + displayName={item.author.displayName} + name={item.author.name} + /> </Link> <View style={styles.layoutContent}> {item.replyingToAuthor && @@ -321,12 +329,6 @@ const styles = StyleSheet.create({ paddingTop: 10, paddingBottom: 10, }, - avi: { - width: 50, - height: 50, - borderRadius: 25, - resizeMode: 'cover', - }, layoutContent: { flex: 1, paddingRight: 10, |