Remove record-with-media side-by-side layout (#5182)
parent
55468595d0
commit
b90cd68359
|
@ -33,7 +33,7 @@ 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, useBreakpoints} from '#/alf'
|
||||
import {atoms as a} from '#/alf'
|
||||
import {RichText} from '#/components/RichText'
|
||||
import {ContentHider} from '../../../../components/moderation/ContentHider'
|
||||
import {PostAlerts} from '../../../../components/moderation/PostAlerts'
|
||||
|
@ -41,7 +41,7 @@ import {Link} from '../Link'
|
|||
import {PostMeta} from '../PostMeta'
|
||||
import {Text} from '../text/Text'
|
||||
import {PostEmbeds} from '.'
|
||||
import {PostEmbedViewContext, QuoteEmbedViewContext} from './types'
|
||||
import {QuoteEmbedViewContext} from './types'
|
||||
|
||||
export function MaybeQuoteEmbed({
|
||||
embed,
|
||||
|
@ -161,7 +161,6 @@ export function QuoteEmbed({
|
|||
onOpen,
|
||||
style,
|
||||
allowNestedQuotes,
|
||||
viewContext,
|
||||
}: {
|
||||
quote: ComposerOptsQuote
|
||||
moderation?: ModerationDecision
|
||||
|
@ -175,7 +174,6 @@ export function QuoteEmbed({
|
|||
const itemUrip = new AtUri(quote.uri)
|
||||
const itemHref = makeProfileLink(quote.author, 'post', itemUrip.rkey)
|
||||
const itemTitle = `Post by ${quote.author.handle}`
|
||||
const {gtMobile} = useBreakpoints()
|
||||
|
||||
const richText = React.useMemo(
|
||||
() =>
|
||||
|
@ -207,7 +205,6 @@ export function QuoteEmbed({
|
|||
}
|
||||
}
|
||||
}, [quote.embeds, allowNestedQuotes])
|
||||
const isImagesEmbed = AppBskyEmbedImages.isView(embed)
|
||||
|
||||
const onBeforePress = React.useCallback(() => {
|
||||
precacheProfile(queryClient, quote.author)
|
||||
|
@ -237,32 +234,6 @@ export function QuoteEmbed({
|
|||
{moderation ? (
|
||||
<PostAlerts modui={moderation.ui('contentView')} style={[a.py_xs]} />
|
||||
) : null}
|
||||
|
||||
{viewContext === QuoteEmbedViewContext.FeedEmbedRecordWithMedia &&
|
||||
isImagesEmbed ? (
|
||||
<View style={[a.flex_row, a.gap_md]}>
|
||||
{embed && (
|
||||
<View style={[{width: gtMobile ? 100 : 80}]}>
|
||||
<PostEmbeds
|
||||
embed={embed}
|
||||
moderation={moderation}
|
||||
viewContext={PostEmbedViewContext.FeedEmbedRecordWithMedia}
|
||||
/>
|
||||
</View>
|
||||
)}
|
||||
{richText ? (
|
||||
<View style={[a.flex_1, a.pt_xs]}>
|
||||
<RichText
|
||||
value={richText}
|
||||
style={a.text_md}
|
||||
numberOfLines={20}
|
||||
disableLinks
|
||||
/>
|
||||
</View>
|
||||
) : null}
|
||||
</View>
|
||||
) : (
|
||||
<>
|
||||
{richText ? (
|
||||
<RichText
|
||||
value={richText}
|
||||
|
@ -272,8 +243,6 @@ export function QuoteEmbed({
|
|||
/>
|
||||
) : null}
|
||||
{embed && <PostEmbeds embed={embed} moderation={moderation} />}
|
||||
</>
|
||||
)}
|
||||
</Link>
|
||||
</ContentHider>
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue