[Neue] Post avi, PostMeta cleanup (#5450)
* Support emoji in text with custom font * Add emoji support to elements that need it * Remove unused file causing lint failure * Add web only link variant * Refactor PostMeta * Reduce avi size in feeds * Fix alignment, emoji, in PostMeta * Smaller avis in notifications * Shrink post placeholder avi * Handle the handle again * Link cleanup * Cleanup unused props * Fix text wrapping in timestamp * Fix underline color * Tighten up spacing * Web only whiteSpace
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
import 'lib/sentry' // must be near top
|
import '#/lib/sentry' // must be near top
|
||||||
import 'view/icons'
|
import '#/view/icons'
|
||||||
import './style.css'
|
import './style.css'
|
||||||
|
|
||||||
import React, {useEffect, useState} from 'react'
|
import React, {useEffect, useState} from 'react'
|
||||||
|
|||||||
+24
-4
@@ -9,6 +9,7 @@ import {sanitizeUrl} from '@braintree/sanitize-url'
|
|||||||
import {StackActions, useLinkProps} from '@react-navigation/native'
|
import {StackActions, useLinkProps} from '@react-navigation/native'
|
||||||
|
|
||||||
import {BSKY_DOWNLOAD_URL} from '#/lib/constants'
|
import {BSKY_DOWNLOAD_URL} from '#/lib/constants'
|
||||||
|
import {useNavigationDeduped} from '#/lib/hooks/useNavigationDeduped'
|
||||||
import {AllNavigatorParams} from '#/lib/routes/types'
|
import {AllNavigatorParams} from '#/lib/routes/types'
|
||||||
import {shareUrl} from '#/lib/sharing'
|
import {shareUrl} from '#/lib/sharing'
|
||||||
import {
|
import {
|
||||||
@@ -17,11 +18,10 @@ import {
|
|||||||
isExternalUrl,
|
isExternalUrl,
|
||||||
linkRequiresWarning,
|
linkRequiresWarning,
|
||||||
} from '#/lib/strings/url-helpers'
|
} from '#/lib/strings/url-helpers'
|
||||||
import {isNative} from '#/platform/detection'
|
import {isNative, isWeb} from '#/platform/detection'
|
||||||
import {shouldClickOpenNewTab} from '#/platform/urls'
|
import {shouldClickOpenNewTab} from '#/platform/urls'
|
||||||
import {useModalControls} from '#/state/modals'
|
import {useModalControls} from '#/state/modals'
|
||||||
import {useOpenLink} from '#/state/preferences/in-app-browser'
|
import {useOpenLink} from '#/state/preferences/in-app-browser'
|
||||||
import {useNavigationDeduped} from 'lib/hooks/useNavigationDeduped'
|
|
||||||
import {atoms as a, flatten, TextStyleProp, useTheme, web} from '#/alf'
|
import {atoms as a, flatten, TextStyleProp, useTheme, web} from '#/alf'
|
||||||
import {Button, ButtonProps} from '#/components/Button'
|
import {Button, ButtonProps} from '#/components/Button'
|
||||||
import {useInteractionState} from '#/components/hooks/useInteractionState'
|
import {useInteractionState} from '#/components/hooks/useInteractionState'
|
||||||
@@ -244,7 +244,10 @@ export function Link({
|
|||||||
export type InlineLinkProps = React.PropsWithChildren<
|
export type InlineLinkProps = React.PropsWithChildren<
|
||||||
BaseLinkProps & TextStyleProp & Pick<TextProps, 'selectable'>
|
BaseLinkProps & TextStyleProp & Pick<TextProps, 'selectable'>
|
||||||
> &
|
> &
|
||||||
Pick<ButtonProps, 'label'>
|
Pick<ButtonProps, 'label'> & {
|
||||||
|
disableUnderline?: boolean
|
||||||
|
title?: TextProps['title']
|
||||||
|
}
|
||||||
|
|
||||||
export function InlineLinkText({
|
export function InlineLinkText({
|
||||||
children,
|
children,
|
||||||
@@ -257,6 +260,7 @@ export function InlineLinkText({
|
|||||||
selectable,
|
selectable,
|
||||||
label,
|
label,
|
||||||
shareOnLongPress,
|
shareOnLongPress,
|
||||||
|
disableUnderline,
|
||||||
...rest
|
...rest
|
||||||
}: InlineLinkProps) {
|
}: InlineLinkProps) {
|
||||||
const t = useTheme()
|
const t = useTheme()
|
||||||
@@ -290,7 +294,8 @@ export function InlineLinkText({
|
|||||||
{...rest}
|
{...rest}
|
||||||
style={[
|
style={[
|
||||||
{color: t.palette.primary_500},
|
{color: t.palette.primary_500},
|
||||||
(hovered || focused || pressed) && {
|
(hovered || focused || pressed) &&
|
||||||
|
!disableUnderline && {
|
||||||
...web({outline: 0}),
|
...web({outline: 0}),
|
||||||
textDecorationLine: 'underline',
|
textDecorationLine: 'underline',
|
||||||
textDecorationColor: flattenedStyle.color ?? t.palette.primary_500,
|
textDecorationColor: flattenedStyle.color ?? t.palette.primary_500,
|
||||||
@@ -365,3 +370,18 @@ export function BaseLink({
|
|||||||
</Pressable>
|
</Pressable>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function WebOnlyInlineLinkText({
|
||||||
|
children,
|
||||||
|
to,
|
||||||
|
onPress,
|
||||||
|
...props
|
||||||
|
}: InlineLinkProps) {
|
||||||
|
return isWeb ? (
|
||||||
|
<InlineLinkText {...props} to={to} onPress={onPress}>
|
||||||
|
{children}
|
||||||
|
</InlineLinkText>
|
||||||
|
) : (
|
||||||
|
<Text {...props}>{children}</Text>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|||||||
@@ -174,7 +174,6 @@ export function MessageInputEmbed({
|
|||||||
showAvatar
|
showAvatar
|
||||||
author={post.author}
|
author={post.author}
|
||||||
moderation={moderation}
|
moderation={moderation}
|
||||||
authorHasWarning={!!post.author.labels?.length}
|
|
||||||
timestamp={post.indexedAt}
|
timestamp={post.indexedAt}
|
||||||
postHref={itemHref}
|
postHref={itemHref}
|
||||||
style={a.flex_0}
|
style={a.flex_0}
|
||||||
|
|||||||
@@ -558,18 +558,14 @@ let PostThreadItemLoaded = ({
|
|||||||
<PostMeta
|
<PostMeta
|
||||||
author={post.author}
|
author={post.author}
|
||||||
moderation={moderation}
|
moderation={moderation}
|
||||||
authorHasWarning={!!post.author.labels?.length}
|
|
||||||
timestamp={post.indexedAt}
|
timestamp={post.indexedAt}
|
||||||
postHref={postHref}
|
postHref={postHref}
|
||||||
showAvatar={isThreadedChild}
|
showAvatar={isThreadedChild}
|
||||||
avatarModeration={moderation.ui('avatar')}
|
avatarModeration={moderation.ui('avatar')}
|
||||||
avatarSize={28}
|
avatarSize={24}
|
||||||
displayNameType="md-bold"
|
|
||||||
displayNameStyle={isThreadedChild && s.ml2}
|
|
||||||
style={
|
style={
|
||||||
isThreadedChild && {
|
isThreadedChild && {
|
||||||
alignItems: 'center',
|
paddingBottom: isWeb ? 5 : 4,
|
||||||
paddingBottom: isWeb ? 5 : 2,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ function PostInner({
|
|||||||
<View style={styles.layoutAvi}>
|
<View style={styles.layoutAvi}>
|
||||||
<AviFollowButton author={post.author} moderation={moderation}>
|
<AviFollowButton author={post.author} moderation={moderation}>
|
||||||
<PreviewableUserAvatar
|
<PreviewableUserAvatar
|
||||||
size={52}
|
size={42}
|
||||||
profile={post.author}
|
profile={post.author}
|
||||||
moderation={moderation.ui('avatar')}
|
moderation={moderation.ui('avatar')}
|
||||||
type={post.author.associated?.labeler ? 'labeler' : 'user'}
|
type={post.author.associated?.labeler ? 'labeler' : 'user'}
|
||||||
@@ -174,7 +174,6 @@ function PostInner({
|
|||||||
<PostMeta
|
<PostMeta
|
||||||
author={post.author}
|
author={post.author}
|
||||||
moderation={moderation}
|
moderation={moderation}
|
||||||
authorHasWarning={!!post.author.labels?.length}
|
|
||||||
timestamp={post.indexedAt}
|
timestamp={post.indexedAt}
|
||||||
postHref={itemHref}
|
postHref={itemHref}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ let FeedItemInner = ({
|
|||||||
onBeforePress={onBeforePress}
|
onBeforePress={onBeforePress}
|
||||||
dataSet={{feedContext}}>
|
dataSet={{feedContext}}>
|
||||||
<View style={{flexDirection: 'row', gap: 10, paddingLeft: 8}}>
|
<View style={{flexDirection: 'row', gap: 10, paddingLeft: 8}}>
|
||||||
<View style={{width: 52}}>
|
<View style={{width: 42}}>
|
||||||
{isThreadChild && (
|
{isThreadChild && (
|
||||||
<View
|
<View
|
||||||
style={[
|
style={[
|
||||||
@@ -345,7 +345,7 @@ let FeedItemInner = ({
|
|||||||
<View style={styles.layoutAvi}>
|
<View style={styles.layoutAvi}>
|
||||||
<AviFollowButton author={post.author} moderation={moderation}>
|
<AviFollowButton author={post.author} moderation={moderation}>
|
||||||
<PreviewableUserAvatar
|
<PreviewableUserAvatar
|
||||||
size={52}
|
size={42}
|
||||||
profile={post.author}
|
profile={post.author}
|
||||||
moderation={moderation.ui('avatar')}
|
moderation={moderation.ui('avatar')}
|
||||||
type={post.author.associated?.labeler ? 'labeler' : 'user'}
|
type={post.author.associated?.labeler ? 'labeler' : 'user'}
|
||||||
@@ -369,7 +369,6 @@ let FeedItemInner = ({
|
|||||||
<PostMeta
|
<PostMeta
|
||||||
author={post.author}
|
author={post.author}
|
||||||
moderation={moderation}
|
moderation={moderation}
|
||||||
authorHasWarning={!!post.author.labels?.length}
|
|
||||||
timestamp={post.indexedAt}
|
timestamp={post.indexedAt}
|
||||||
postHref={href}
|
postHref={href}
|
||||||
onOpenAuthor={onOpenAuthor}
|
onOpenAuthor={onOpenAuthor}
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import Svg, {Circle, Line} from 'react-native-svg'
|
|||||||
import {AtUri} from '@atproto/api'
|
import {AtUri} from '@atproto/api'
|
||||||
import {Trans} from '@lingui/macro'
|
import {Trans} from '@lingui/macro'
|
||||||
|
|
||||||
|
import {usePalette} from '#/lib/hooks/usePalette'
|
||||||
|
import {makeProfileLink} from '#/lib/routes/links'
|
||||||
import {FeedPostSlice} from '#/state/queries/post-feed'
|
import {FeedPostSlice} from '#/state/queries/post-feed'
|
||||||
import {usePalette} from 'lib/hooks/usePalette'
|
|
||||||
import {makeProfileLink} from 'lib/routes/links'
|
|
||||||
import {Link} from '../util/Link'
|
import {Link} from '../util/Link'
|
||||||
import {Text} from '../util/text/Text'
|
import {Text} from '../util/text/Text'
|
||||||
import {FeedItem} from './FeedItem'
|
import {FeedItem} from './FeedItem'
|
||||||
@@ -146,7 +146,7 @@ const styles = StyleSheet.create({
|
|||||||
paddingLeft: 18,
|
paddingLeft: 18,
|
||||||
},
|
},
|
||||||
viewFullThreadDots: {
|
viewFullThreadDots: {
|
||||||
width: 52,
|
width: 42,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ import {
|
|||||||
ViewStyle,
|
ViewStyle,
|
||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
|
|
||||||
import {usePalette} from 'lib/hooks/usePalette'
|
import {usePalette} from '#/lib/hooks/usePalette'
|
||||||
import {s} from 'lib/styles'
|
import {s} from '#/lib/styles'
|
||||||
import {useTheme} from 'lib/ThemeContext'
|
import {useTheme} from '#/lib/ThemeContext'
|
||||||
import {atoms as a, useTheme as useTheme_NEW} from '#/alf'
|
import {atoms as a, useTheme as useTheme_NEW} from '#/alf'
|
||||||
import {Bubble_Stroke2_Corner2_Rounded as Bubble} from '#/components/icons/Bubble'
|
import {Bubble_Stroke2_Corner2_Rounded as Bubble} from '#/components/icons/Bubble'
|
||||||
import {
|
import {
|
||||||
@@ -53,8 +53,8 @@ export function PostLoadingPlaceholder({
|
|||||||
return (
|
return (
|
||||||
<View style={[styles.post, pal.view, style]}>
|
<View style={[styles.post, pal.view, style]}>
|
||||||
<LoadingPlaceholder
|
<LoadingPlaceholder
|
||||||
width={52}
|
width={42}
|
||||||
height={52}
|
height={42}
|
||||||
style={[
|
style={[
|
||||||
styles.avatar,
|
styles.avatar,
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,44 +1,40 @@
|
|||||||
import React, {memo, useCallback} from 'react'
|
import React, {memo, useCallback} from 'react'
|
||||||
import {StyleProp, StyleSheet, TextStyle, View, ViewStyle} from 'react-native'
|
import {StyleProp, View, ViewStyle} from 'react-native'
|
||||||
import {AppBskyActorDefs, ModerationDecision, ModerationUI} from '@atproto/api'
|
import {AppBskyActorDefs, ModerationDecision, ModerationUI} from '@atproto/api'
|
||||||
|
import {msg} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
import {useQueryClient} from '@tanstack/react-query'
|
import {useQueryClient} from '@tanstack/react-query'
|
||||||
|
|
||||||
import {usePalette} from '#/lib/hooks/usePalette'
|
|
||||||
import {makeProfileLink} from '#/lib/routes/links'
|
import {makeProfileLink} from '#/lib/routes/links'
|
||||||
import {forceLTR} from '#/lib/strings/bidi'
|
import {forceLTR} from '#/lib/strings/bidi'
|
||||||
import {NON_BREAKING_SPACE} from '#/lib/strings/constants'
|
import {NON_BREAKING_SPACE} from '#/lib/strings/constants'
|
||||||
import {sanitizeDisplayName} from '#/lib/strings/display-names'
|
import {sanitizeDisplayName} from '#/lib/strings/display-names'
|
||||||
import {sanitizeHandle} from '#/lib/strings/handles'
|
import {sanitizeHandle} from '#/lib/strings/handles'
|
||||||
import {niceDate} from '#/lib/strings/time'
|
import {niceDate} from '#/lib/strings/time'
|
||||||
import {TypographyVariant} from '#/lib/ThemeContext'
|
|
||||||
import {isAndroid} from '#/platform/detection'
|
|
||||||
import {precacheProfile} from '#/state/queries/profile'
|
import {precacheProfile} from '#/state/queries/profile'
|
||||||
|
import {atoms as a, useTheme, web} from '#/alf'
|
||||||
|
import {WebOnlyInlineLinkText} from '#/components/Link'
|
||||||
import {ProfileHoverCard} from '#/components/ProfileHoverCard'
|
import {ProfileHoverCard} from '#/components/ProfileHoverCard'
|
||||||
import {TextLinkOnWebOnly} from './Link'
|
import {Text} from '#/components/Typography'
|
||||||
import {Text} from './text/Text'
|
|
||||||
import {TimeElapsed} from './TimeElapsed'
|
import {TimeElapsed} from './TimeElapsed'
|
||||||
import {PreviewableUserAvatar} from './UserAvatar'
|
import {PreviewableUserAvatar} from './UserAvatar'
|
||||||
|
|
||||||
interface PostMetaOpts {
|
interface PostMetaOpts {
|
||||||
author: AppBskyActorDefs.ProfileViewBasic
|
author: AppBskyActorDefs.ProfileViewBasic
|
||||||
moderation: ModerationDecision | undefined
|
moderation: ModerationDecision | undefined
|
||||||
authorHasWarning: boolean
|
|
||||||
postHref: string
|
postHref: string
|
||||||
timestamp: string
|
timestamp: string
|
||||||
showAvatar?: boolean
|
showAvatar?: boolean
|
||||||
avatarModeration?: ModerationUI
|
avatarModeration?: ModerationUI
|
||||||
avatarSize?: number
|
avatarSize?: number
|
||||||
displayNameType?: TypographyVariant
|
|
||||||
displayNameStyle?: StyleProp<TextStyle>
|
|
||||||
onOpenAuthor?: () => void
|
onOpenAuthor?: () => void
|
||||||
style?: StyleProp<ViewStyle>
|
style?: StyleProp<ViewStyle>
|
||||||
}
|
}
|
||||||
|
|
||||||
let PostMeta = (opts: PostMetaOpts): React.ReactNode => {
|
let PostMeta = (opts: PostMetaOpts): React.ReactNode => {
|
||||||
const {i18n} = useLingui()
|
const t = useTheme()
|
||||||
|
const {i18n, _} = useLingui()
|
||||||
|
|
||||||
const pal = usePalette('default')
|
|
||||||
const displayName = opts.author.displayName || opts.author.handle
|
const displayName = opts.author.displayName || opts.author.handle
|
||||||
const handle = opts.author.handle
|
const handle = opts.author.handle
|
||||||
const profileLink = makeProfileLink(opts.author)
|
const profileLink = makeProfileLink(opts.author)
|
||||||
@@ -53,9 +49,18 @@ let PostMeta = (opts: PostMetaOpts): React.ReactNode => {
|
|||||||
}, [queryClient, opts.author])
|
}, [queryClient, opts.author])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={[styles.container, opts.style]}>
|
<View
|
||||||
|
style={[
|
||||||
|
a.flex_1,
|
||||||
|
a.flex_row,
|
||||||
|
a.align_center,
|
||||||
|
a.pb_2xs,
|
||||||
|
a.gap_xs,
|
||||||
|
a.z_10,
|
||||||
|
opts.style,
|
||||||
|
]}>
|
||||||
{opts.showAvatar && (
|
{opts.showAvatar && (
|
||||||
<View style={styles.avatar}>
|
<View style={[a.self_center, a.mr_2xs]}>
|
||||||
<PreviewableUserAvatar
|
<PreviewableUserAvatar
|
||||||
size={opts.avatarSize || 16}
|
size={opts.avatarSize || 16}
|
||||||
profile={opts.author}
|
profile={opts.author}
|
||||||
@@ -65,20 +70,14 @@ let PostMeta = (opts: PostMetaOpts): React.ReactNode => {
|
|||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
<ProfileHoverCard inline did={opts.author.did}>
|
<ProfileHoverCard inline did={opts.author.did}>
|
||||||
<Text
|
<Text numberOfLines={1} style={[a.flex_shrink]}>
|
||||||
numberOfLines={1}
|
<WebOnlyInlineLinkText
|
||||||
style={[styles.maxWidth, pal.textLight, opts.displayNameStyle]}>
|
to={profileLink}
|
||||||
<TextLinkOnWebOnly
|
label={_(msg`View profile`)}
|
||||||
type={opts.displayNameType || 'lg-bold'}
|
|
||||||
style={[pal.text]}
|
|
||||||
lineHeight={1.2}
|
|
||||||
disableMismatchWarning
|
disableMismatchWarning
|
||||||
text={
|
onPress={onBeforePressAuthor}
|
||||||
<Text
|
style={[t.atoms.text]}>
|
||||||
type={opts.displayNameType || 'lg-bold'}
|
<Text emoji style={[a.text_md, a.font_bold, a.leading_tight]}>
|
||||||
emoji
|
|
||||||
style={[pal.text]}
|
|
||||||
lineHeight={1.2}>
|
|
||||||
{forceLTR(
|
{forceLTR(
|
||||||
sanitizeDisplayName(
|
sanitizeDisplayName(
|
||||||
displayName,
|
displayName,
|
||||||
@@ -86,42 +85,52 @@ let PostMeta = (opts: PostMetaOpts): React.ReactNode => {
|
|||||||
),
|
),
|
||||||
)}
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
}
|
</WebOnlyInlineLinkText>
|
||||||
href={profileLink}
|
<WebOnlyInlineLinkText
|
||||||
onBeforePress={onBeforePressAuthor}
|
to={profileLink}
|
||||||
/>
|
label={_(msg`View profile`)}
|
||||||
<TextLinkOnWebOnly
|
|
||||||
type="md"
|
|
||||||
disableMismatchWarning
|
disableMismatchWarning
|
||||||
style={[pal.textLight, {flexShrink: 4}]}
|
disableUnderline
|
||||||
text={
|
onPress={onBeforePressAuthor}
|
||||||
<Text emoji style={[pal.textLight, {flexShrink: 4}]}>
|
style={[a.text_md, t.atoms.text_contrast_medium, a.leading_tight]}>
|
||||||
|
<Text
|
||||||
|
emoji
|
||||||
|
style={[
|
||||||
|
a.text_md,
|
||||||
|
t.atoms.text_contrast_medium,
|
||||||
|
a.leading_tight,
|
||||||
|
]}>
|
||||||
{NON_BREAKING_SPACE + sanitizeHandle(handle, '@')}
|
{NON_BREAKING_SPACE + sanitizeHandle(handle, '@')}
|
||||||
</Text>
|
</Text>
|
||||||
}
|
</WebOnlyInlineLinkText>
|
||||||
href={profileLink}
|
|
||||||
onBeforePress={onBeforePressAuthor}
|
|
||||||
anchorNoUnderline
|
|
||||||
/>
|
|
||||||
</Text>
|
</Text>
|
||||||
</ProfileHoverCard>
|
</ProfileHoverCard>
|
||||||
{!isAndroid && (
|
|
||||||
<Text type="md" style={pal.textLight} accessible={false}>
|
<Text
|
||||||
|
style={[a.text_md, t.atoms.text_contrast_medium]}
|
||||||
|
accessible={false}>
|
||||||
·
|
·
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
|
||||||
<TimeElapsed timestamp={opts.timestamp}>
|
<TimeElapsed timestamp={opts.timestamp}>
|
||||||
{({timeElapsed}) => (
|
{({timeElapsed}) => (
|
||||||
<TextLinkOnWebOnly
|
<WebOnlyInlineLinkText
|
||||||
type="md"
|
to={opts.postHref}
|
||||||
style={pal.textLight}
|
label={niceDate(i18n, opts.timestamp)}
|
||||||
text={timeElapsed}
|
|
||||||
accessibilityLabel={niceDate(i18n, opts.timestamp)}
|
|
||||||
title={niceDate(i18n, opts.timestamp)}
|
title={niceDate(i18n, opts.timestamp)}
|
||||||
accessibilityHint=""
|
disableMismatchWarning
|
||||||
href={opts.postHref}
|
disableUnderline
|
||||||
onBeforePress={onBeforePressPost}
|
onPress={onBeforePressPost}
|
||||||
/>
|
style={[
|
||||||
|
a.text_md,
|
||||||
|
t.atoms.text_contrast_medium,
|
||||||
|
a.leading_tight,
|
||||||
|
web({
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
|
}),
|
||||||
|
]}>
|
||||||
|
{timeElapsed}
|
||||||
|
</WebOnlyInlineLinkText>
|
||||||
)}
|
)}
|
||||||
</TimeElapsed>
|
</TimeElapsed>
|
||||||
</View>
|
</View>
|
||||||
@@ -129,21 +138,3 @@ let PostMeta = (opts: PostMetaOpts): React.ReactNode => {
|
|||||||
}
|
}
|
||||||
PostMeta = memo(PostMeta)
|
PostMeta = memo(PostMeta)
|
||||||
export {PostMeta}
|
export {PostMeta}
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
|
||||||
container: {
|
|
||||||
flexDirection: 'row',
|
|
||||||
alignItems: 'flex-end',
|
|
||||||
paddingBottom: 2,
|
|
||||||
gap: 4,
|
|
||||||
zIndex: 1,
|
|
||||||
flex: 1,
|
|
||||||
},
|
|
||||||
avatar: {
|
|
||||||
alignSelf: 'center',
|
|
||||||
},
|
|
||||||
maxWidth: {
|
|
||||||
flex: isAndroid ? 1 : undefined,
|
|
||||||
flexShrink: isAndroid ? undefined : 1,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|||||||
@@ -24,15 +24,15 @@ import {useLingui} from '@lingui/react'
|
|||||||
import {useQueryClient} from '@tanstack/react-query'
|
import {useQueryClient} from '@tanstack/react-query'
|
||||||
|
|
||||||
import {HITSLOP_20} from '#/lib/constants'
|
import {HITSLOP_20} from '#/lib/constants'
|
||||||
|
import {usePalette} from '#/lib/hooks/usePalette'
|
||||||
|
import {InfoCircleIcon} from '#/lib/icons'
|
||||||
import {moderatePost_wrapped} from '#/lib/moderatePost_wrapped'
|
import {moderatePost_wrapped} from '#/lib/moderatePost_wrapped'
|
||||||
|
import {makeProfileLink} from '#/lib/routes/links'
|
||||||
import {s} from '#/lib/styles'
|
import {s} from '#/lib/styles'
|
||||||
import {useModerationOpts} from '#/state/preferences/moderation-opts'
|
import {useModerationOpts} from '#/state/preferences/moderation-opts'
|
||||||
|
import {precacheProfile} from '#/state/queries/profile'
|
||||||
import {useSession} from '#/state/session'
|
import {useSession} from '#/state/session'
|
||||||
import {usePalette} from 'lib/hooks/usePalette'
|
import {ComposerOptsQuote} from '#/state/shell/composer'
|
||||||
import {InfoCircleIcon} from 'lib/icons'
|
|
||||||
import {makeProfileLink} from 'lib/routes/links'
|
|
||||||
import {precacheProfile} from 'state/queries/profile'
|
|
||||||
import {ComposerOptsQuote} from 'state/shell/composer'
|
|
||||||
import {atoms as a, useTheme} from '#/alf'
|
import {atoms as a, useTheme} from '#/alf'
|
||||||
import {RichText} from '#/components/RichText'
|
import {RichText} from '#/components/RichText'
|
||||||
import {ContentHider} from '../../../../components/moderation/ContentHider'
|
import {ContentHider} from '../../../../components/moderation/ContentHider'
|
||||||
@@ -238,7 +238,6 @@ export function QuoteEmbed({
|
|||||||
author={quote.author}
|
author={quote.author}
|
||||||
moderation={moderation}
|
moderation={moderation}
|
||||||
showAvatar
|
showAvatar
|
||||||
authorHasWarning={false}
|
|
||||||
postHref={itemHref}
|
postHref={itemHref}
|
||||||
timestamp={quote.indexedAt}
|
timestamp={quote.indexedAt}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user