From 302acaccb63202a5daf6166a0c046920afa0c759 Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Wed, 18 Jan 2023 13:10:08 -0600 Subject: [PATCH] Remove all links from post meta to ensure taps are more consistent --- src/view/com/post-thread/PostThreadItem.tsx | 1 - src/view/com/post/Post.tsx | 19 +++++++----------- src/view/com/posts/FeedItem.tsx | 22 +++++++-------------- 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 2456da5a41..cbd6f86b8d 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({ { store.shell.openComposer({ @@ -153,12 +151,11 @@ export const Post = observer(function Post({ - {replyHref !== '' && ( + {replyAuthorDid !== '' && ( Reply to - - - + )} {item.post.author.viewer?.muted ? ( diff --git a/src/view/com/posts/FeedItem.tsx b/src/view/com/posts/FeedItem.tsx index cfac2bedea..8aee886ba3 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 ({ - {!isChild && replyHref !== '' && ( + {!isChild && replyAuthorDid !== '' && ( Reply to - - - + )} {item.post.author.viewer?.muted && diff --git a/src/view/com/util/PostMeta.tsx b/src/view/com/util/PostMeta.tsx index 2414803236..35edeafb44 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 ( - + {displayName} {handle ? ( @@ -48,7 +43,7 @@ export function PostMeta(opts: PostMetaOpts) { ) : undefined} - + · {ago(opts.timestamp)}