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 {makeProfileLink} from 'lib/routes/links'
|
||||||
import {precacheProfile} from 'state/queries/profile'
|
import {precacheProfile} from 'state/queries/profile'
|
||||||
import {ComposerOptsQuote} from 'state/shell/composer'
|
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 {RichText} from '#/components/RichText'
|
||||||
import {ContentHider} from '../../../../components/moderation/ContentHider'
|
import {ContentHider} from '../../../../components/moderation/ContentHider'
|
||||||
import {PostAlerts} from '../../../../components/moderation/PostAlerts'
|
import {PostAlerts} from '../../../../components/moderation/PostAlerts'
|
||||||
|
@ -41,7 +41,7 @@ import {Link} from '../Link'
|
||||||
import {PostMeta} from '../PostMeta'
|
import {PostMeta} from '../PostMeta'
|
||||||
import {Text} from '../text/Text'
|
import {Text} from '../text/Text'
|
||||||
import {PostEmbeds} from '.'
|
import {PostEmbeds} from '.'
|
||||||
import {PostEmbedViewContext, QuoteEmbedViewContext} from './types'
|
import {QuoteEmbedViewContext} from './types'
|
||||||
|
|
||||||
export function MaybeQuoteEmbed({
|
export function MaybeQuoteEmbed({
|
||||||
embed,
|
embed,
|
||||||
|
@ -161,7 +161,6 @@ export function QuoteEmbed({
|
||||||
onOpen,
|
onOpen,
|
||||||
style,
|
style,
|
||||||
allowNestedQuotes,
|
allowNestedQuotes,
|
||||||
viewContext,
|
|
||||||
}: {
|
}: {
|
||||||
quote: ComposerOptsQuote
|
quote: ComposerOptsQuote
|
||||||
moderation?: ModerationDecision
|
moderation?: ModerationDecision
|
||||||
|
@ -175,7 +174,6 @@ export function QuoteEmbed({
|
||||||
const itemUrip = new AtUri(quote.uri)
|
const itemUrip = new AtUri(quote.uri)
|
||||||
const itemHref = makeProfileLink(quote.author, 'post', itemUrip.rkey)
|
const itemHref = makeProfileLink(quote.author, 'post', itemUrip.rkey)
|
||||||
const itemTitle = `Post by ${quote.author.handle}`
|
const itemTitle = `Post by ${quote.author.handle}`
|
||||||
const {gtMobile} = useBreakpoints()
|
|
||||||
|
|
||||||
const richText = React.useMemo(
|
const richText = React.useMemo(
|
||||||
() =>
|
() =>
|
||||||
|
@ -207,7 +205,6 @@ export function QuoteEmbed({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [quote.embeds, allowNestedQuotes])
|
}, [quote.embeds, allowNestedQuotes])
|
||||||
const isImagesEmbed = AppBskyEmbedImages.isView(embed)
|
|
||||||
|
|
||||||
const onBeforePress = React.useCallback(() => {
|
const onBeforePress = React.useCallback(() => {
|
||||||
precacheProfile(queryClient, quote.author)
|
precacheProfile(queryClient, quote.author)
|
||||||
|
@ -237,43 +234,15 @@ export function QuoteEmbed({
|
||||||
{moderation ? (
|
{moderation ? (
|
||||||
<PostAlerts modui={moderation.ui('contentView')} style={[a.py_xs]} />
|
<PostAlerts modui={moderation.ui('contentView')} style={[a.py_xs]} />
|
||||||
) : null}
|
) : null}
|
||||||
|
{richText ? (
|
||||||
{viewContext === QuoteEmbedViewContext.FeedEmbedRecordWithMedia &&
|
<RichText
|
||||||
isImagesEmbed ? (
|
value={richText}
|
||||||
<View style={[a.flex_row, a.gap_md]}>
|
style={a.text_md}
|
||||||
{embed && (
|
numberOfLines={20}
|
||||||
<View style={[{width: gtMobile ? 100 : 80}]}>
|
disableLinks
|
||||||
<PostEmbeds
|
/>
|
||||||
embed={embed}
|
) : null}
|
||||||
moderation={moderation}
|
{embed && <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}
|
|
||||||
style={a.text_md}
|
|
||||||
numberOfLines={20}
|
|
||||||
disableLinks
|
|
||||||
/>
|
|
||||||
) : null}
|
|
||||||
{embed && <PostEmbeds embed={embed} moderation={moderation} />}
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</Link>
|
</Link>
|
||||||
</ContentHider>
|
</ContentHider>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue