diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/view/com/post-thread/PostThreadItem.tsx | 1 | ||||
-rw-r--r-- | src/view/com/post/Post.tsx | 19 | ||||
-rw-r--r-- | src/view/com/posts/FeedItem.tsx | 22 | ||||
-rw-r--r-- | src/view/com/util/PostMeta.tsx | 9 |
4 files changed, 16 insertions, 35 deletions
diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx index 2456da5a4..cbd6f86b8 100644 --- a/src/view/com/post-thread/PostThreadItem.tsx +++ b/src/view/com/post-thread/PostThreadItem.tsx @@ -284,7 +284,6 @@ export const PostThreadItem = observer(function PostThreadItem({ </View> <View style={styles.layoutContent}> <PostMeta - authorHref={authorHref} authorHandle={item.post.author.handle} authorDisplayName={item.post.author.displayName} timestamp={item.post.indexedAt} diff --git a/src/view/com/post/Post.tsx b/src/view/com/post/Post.tsx index 7e0a87050..90d89ea7b 100644 --- a/src/view/com/post/Post.tsx +++ b/src/view/com/post/Post.tsx @@ -86,11 +86,9 @@ export const Post = observer(function Post({ const authorHref = `/profile/${item.post.author.handle}` const authorTitle = item.post.author.handle let replyAuthorDid = '' - let replyHref = '' if (record.reply) { const urip = new AtUri(record.reply.parent?.uri || record.reply.root.uri) replyAuthorDid = urip.hostname - replyHref = `/profile/${urip.hostname}/post/${urip.rkey}` } const onPressReply = () => { store.shell.openComposer({ @@ -153,12 +151,11 @@ export const Post = observer(function Post({ </View> <View style={styles.layoutContent}> <PostMeta - authorHref={authorHref} authorHandle={item.post.author.handle} authorDisplayName={item.post.author.displayName} timestamp={item.post.indexedAt} /> - {replyHref !== '' && ( + {replyAuthorDid !== '' && ( <View style={[s.flexRow, s.mb2, {alignItems: 'center'}]}> <FontAwesomeIcon icon="reply" @@ -168,14 +165,12 @@ export const Post = observer(function Post({ <Text type="sm" style={[pal.textLight, s.mr2]}> Reply to </Text> - <Link href={replyHref} title="Parent post"> - <UserInfoText - type="sm" - did={replyAuthorDid} - attr="displayName" - style={[pal.textLight]} - /> - </Link> + <UserInfoText + type="sm" + did={replyAuthorDid} + attr="displayName" + style={[pal.textLight]} + /> </View> )} {item.post.author.viewer?.muted ? ( diff --git a/src/view/com/posts/FeedItem.tsx b/src/view/com/posts/FeedItem.tsx index cfac2bede..8aee886ba 100644 --- a/src/view/com/posts/FeedItem.tsx +++ b/src/view/com/posts/FeedItem.tsx @@ -44,11 +44,6 @@ export const FeedItem = observer(function ({ const urip = new AtUri(record.reply.parent?.uri || record.reply.root.uri) return urip.hostname }, [record?.reply]) - const replyHref = useMemo(() => { - if (!record?.reply) return '' - const urip = new AtUri(record?.reply.parent?.uri || record?.reply.root.uri) - return `/profile/${urip.hostname}/post/${urip.rkey}` - }, [record?.reply]) const onPressReply = () => { store.shell.openComposer({ @@ -162,12 +157,11 @@ export const FeedItem = observer(function ({ </View> <View style={styles.layoutContent}> <PostMeta - authorHref={authorHref} authorHandle={item.post.author.handle} authorDisplayName={item.post.author.displayName} timestamp={item.post.indexedAt} /> - {!isChild && replyHref !== '' && ( + {!isChild && replyAuthorDid !== '' && ( <View style={[s.flexRow, s.mb2, {alignItems: 'center'}]}> <FontAwesomeIcon icon="reply" @@ -177,14 +171,12 @@ export const FeedItem = observer(function ({ <Text type="md" style={[pal.textLight, s.mr2]}> Reply to </Text> - <Link href={replyHref} title="Parent post"> - <UserInfoText - type="md" - did={replyAuthorDid} - attr="displayName" - style={[pal.textLight, s.ml2]} - /> - </Link> + <UserInfoText + type="md" + did={replyAuthorDid} + attr="displayName" + style={[pal.textLight, s.ml2]} + /> </View> )} {item.post.author.viewer?.muted && diff --git a/src/view/com/util/PostMeta.tsx b/src/view/com/util/PostMeta.tsx index 241480323..35edeafb4 100644 --- a/src/view/com/util/PostMeta.tsx +++ b/src/view/com/util/PostMeta.tsx @@ -1,12 +1,10 @@ import React from 'react' import {Platform, StyleSheet, View} from 'react-native' -import {Link} from '../util/Link' import {Text} from './text/Text' import {ago} from '../../../lib/strings' import {usePalette} from '../../lib/hooks/usePalette' interface PostMetaOpts { - authorHref: string authorHandle: string authorDisplayName: string | undefined timestamp: string @@ -36,10 +34,7 @@ export function PostMeta(opts: PostMetaOpts) { return ( <View style={styles.meta}> - <Link - style={[styles.metaItem, styles.maxWidth]} - href={opts.authorHref} - title={opts.authorHandle}> + <View style={[styles.metaItem, styles.maxWidth]}> <Text type="lg-bold" style={[pal.text]} numberOfLines={1}> {displayName} {handle ? ( @@ -48,7 +43,7 @@ export function PostMeta(opts: PostMetaOpts) { </Text> ) : undefined} </Text> - </Link> + </View> <Text type="md" style={[styles.metaItem, pal.textLight]}> · {ago(opts.timestamp)} </Text> |