diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-07-07 12:00:17 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-07 12:00:17 -0500 |
commit | 237e957d1699fb4da756e9acc98c527f282e90b0 (patch) | |
tree | e1bcfceccbb0747b3e234407c9a3612d010ccaaa /src/view/com/post/Post.tsx | |
parent | d8aded7b15ba6a59750ec877fae63fa2a64afe4c (diff) | |
download | voidsky-237e957d1699fb4da756e9acc98c527f282e90b0.tar.zst |
Fixes and improvements to the Profile Preview modal (#992)
* Fix: use more reliable navigation method * Fix: show lightbox over the active modal * Fix: close the profile preview on navigation * Factor out UserPreviewLink and add preview behavior to notifications * Fix postmeta overflow on web * Fix lint
Diffstat (limited to 'src/view/com/post/Post.tsx')
-rw-r--r-- | src/view/com/post/Post.tsx | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/view/com/post/Post.tsx b/src/view/com/post/Post.tsx index 34154e7ed..bdc84b62f 100644 --- a/src/view/com/post/Post.tsx +++ b/src/view/com/post/Post.tsx @@ -25,7 +25,7 @@ import {ImageHider} from '../util/moderation/ImageHider' import {Text} from '../util/text/Text' import {RichText} from '../util/text/RichText' import * as Toast from '../util/Toast' -import {UserAvatar} from '../util/UserAvatar' +import {PreviewableUserAvatar} from '../util/UserAvatar' import {useStores} from 'state/index' import {s, colors} from 'lib/styles' import {usePalette} from 'lib/hooks/usePalette' @@ -127,8 +127,6 @@ const PostLoaded = observer( const itemUrip = new AtUri(item.post.uri) const itemHref = `/profile/${item.post.author.handle}/post/${itemUrip.rkey}` const itemTitle = `Post by ${item.post.author.handle}` - const authorHref = `/profile/${item.post.author.handle}` - const authorTitle = item.post.author.handle let replyAuthorDid = '' if (record.reply) { const urip = new AtUri(record.reply.parent?.uri || record.reply.root.uri) @@ -214,13 +212,13 @@ const PostLoaded = observer( {showReplyLine && <View style={styles.replyLine} />} <View style={styles.layout}> <View style={styles.layoutAvi}> - <Link href={authorHref} title={authorTitle} asAnchor> - <UserAvatar - size={52} - avatar={item.post.author.avatar} - moderation={item.moderation.avatar} - /> - </Link> + <PreviewableUserAvatar + size={52} + did={item.post.author.did} + handle={item.post.author.handle} + avatar={item.post.author.avatar} + moderation={item.moderation.avatar} + /> </View> <View style={styles.layoutContent}> <PostMeta |