Remove all links from post meta to ensure taps are more consistent
parent
6a01e0529b
commit
302acaccb6
|
@ -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}
|
||||
|
|
|
@ -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>
|
||||
</View>
|
||||
)}
|
||||
{item.post.author.viewer?.muted ? (
|
||||
|
|
|
@ -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>
|
||||
</View>
|
||||
)}
|
||||
{item.post.author.viewer?.muted &&
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue