diff --git a/src/components/Post/Embed/ImageEmbed.tsx b/src/components/Post/Embed/ImageEmbed.tsx index ccd1ceb270..2c6bb6c5de 100644 --- a/src/components/Post/Embed/ImageEmbed.tsx +++ b/src/components/Post/Embed/ImageEmbed.tsx @@ -87,8 +87,7 @@ export function ImageEmbed({ crop={ rest.viewContext === PostEmbedViewContext.ThreadHighlighted ? 'none' - : rest.viewContext === - PostEmbedViewContext.FeedEmbedRecordWithMedia + : rest.isWithinQuote ? 'square' : 'constrained' } @@ -103,10 +102,7 @@ export function ImageEmbed({ onPress(0, [containerRef], [dims]) } onPressIn={() => onPressIn(0)} - hideBadge={ - rest.viewContext === - PostEmbedViewContext.FeedEmbedRecordWithMedia - } + hideBadge={rest.isWithinQuote} /> @@ -121,6 +117,7 @@ export function ImageEmbed({ onPress={onPress} onPressIn={onPressIn} viewContext={rest.viewContext} + isWithinQuote={rest.isWithinQuote} /> ) diff --git a/src/components/images/Gallery/index.tsx b/src/components/images/Gallery/index.tsx index f4ffcd7159..fe2b63e606 100644 --- a/src/components/images/Gallery/index.tsx +++ b/src/components/images/Gallery/index.tsx @@ -54,6 +54,7 @@ interface GalleryProps { ) => void onPressIn?: (index: number) => void viewContext?: PostEmbedViewContext + isWithinQuote?: boolean } const Context = createContext<{ @@ -97,6 +98,7 @@ export function Gallery({ onPress, onPressIn, viewContext, + isWithinQuote, }: GalleryProps) { const {t: l} = useLingui() const ax = useAnalytics() @@ -104,14 +106,21 @@ export function Gallery({ const largeAltBadge = useLargeAltBadgeEnabled() const bps = useBreakpoints() const window = useWindowDimensions() - const isWithinQuote = - viewContext === PostEmbedViewContext.FeedEmbedRecordWithMedia const isWithinChat = viewContext === PostEmbedViewContext.ChatMessage const hideBadges = isWithinQuote const contentHeight = useMemo(() => { if (isWithinChat) { return 120 } + if (isWithinQuote) { + if (bps.gtMobile) { + return 220 + } else if (bps.gtPhone) { + return 190 + } else { + return 150 + } + } if (bps.gtMobile) { return 300 } else if (bps.gtPhone) { @@ -119,7 +128,7 @@ export function Gallery({ } else { return 200 } - }, [bps, isWithinChat]) + }, [bps, isWithinChat, isWithinQuote]) /* * Container overflow styles @@ -220,7 +229,7 @@ export function Gallery({ crop={ viewContext === PostEmbedViewContext.ThreadHighlighted ? 'none' - : viewContext === PostEmbedViewContext.FeedEmbedRecordWithMedia + : isWithinQuote ? 'square' : 'constrained' } @@ -229,9 +238,7 @@ export function Gallery({ onPress?.(index, [containerRef], [dims]) } onPressIn={() => onPressIn?.(index)} - hideBadge={ - viewContext === PostEmbedViewContext.FeedEmbedRecordWithMedia - } + hideBadge={isWithinQuote} /> ))}