From 495d1fe9a7a7d9b447eb7bb64e88b915bf0bb1f6 Mon Sep 17 00:00:00 2001 From: Jerry Chen Date: Mon, 22 Jun 2026 13:05:50 -0600 Subject: [PATCH] Restore ALT badges in quoted posts (#10964) Co-authored-by: Eric Bailey --- src/components/Post/Embed/ImageEmbed.tsx | 1 - src/components/images/AutoSizedImage.tsx | 15 ++++++++------- src/components/images/Gallery/index.tsx | 11 ++++------- src/components/images/ImageLayoutGridItem.tsx | 17 +++++------------ 4 files changed, 17 insertions(+), 27 deletions(-) diff --git a/src/components/Post/Embed/ImageEmbed.tsx b/src/components/Post/Embed/ImageEmbed.tsx index 9d47302063..ecc0c09d13 100644 --- a/src/components/Post/Embed/ImageEmbed.tsx +++ b/src/components/Post/Embed/ImageEmbed.tsx @@ -142,7 +142,6 @@ export function ImageEmbed({ onPress(0, [containerRef], [dims]) } onPressIn={() => onPressIn(0)} - hideBadge={rest.isWithinQuote} /> diff --git a/src/components/images/AutoSizedImage.tsx b/src/components/images/AutoSizedImage.tsx index 182bfe661b..fdc7d1988a 100644 --- a/src/components/images/AutoSizedImage.tsx +++ b/src/components/images/AutoSizedImage.tsx @@ -65,7 +65,6 @@ export function ConstrainedImage({ export function AutoSizedImage({ image, crop = 'constrained', - hideBadge, onPress, onLongPress, onPressIn, @@ -74,7 +73,6 @@ export function AutoSizedImage({ }: { image: AppBskyEmbedImages.ViewImage crop?: 'none' | 'square' | 'constrained' - hideBadge?: boolean onPress?: ( containerRef: AnimatedRef, fetchedDims: Dimensions | null, @@ -146,7 +144,7 @@ export function AutoSizedImage({ /> - {(hasAlt || isCropped) && !hideBadge ? ( + {hasAlt || isCropped ? ( {isCropped && ( diff --git a/src/components/images/Gallery/index.tsx b/src/components/images/Gallery/index.tsx index 5b0d97bc17..a9d483398c 100644 --- a/src/components/images/Gallery/index.tsx +++ b/src/components/images/Gallery/index.tsx @@ -115,7 +115,6 @@ export function Gallery({ const bps = useBreakpoints() const window = useWindowDimensions() const isWithinChat = viewContext === PostEmbedViewContext.ChatMessage - const hideBadges = isWithinQuote const contentHeight = useMemo(() => { if (isWithinChat) { return 120 @@ -250,7 +249,6 @@ export function Gallery({ onPress?.(index, [containerRef], [dims]) } onPressIn={() => onPressIn?.(index)} - hideBadge={isWithinQuote} /> ))} @@ -300,7 +298,6 @@ export function Gallery({ : undefined return ( void itemRef: (node: View | null) => void - hideBadges?: boolean largeAltBadge?: boolean onContainerRef: (index: number, ref: AnimatedRef) => void onThumbDims: (index: number, dims: Dimensions) => void @@ -499,7 +494,7 @@ function GalleryImage({ useAppleWebpCodec /> - {!hideBadges && imageCount > 1 ? ( + {imageCount > 1 ? ( ) : null} - {(hasAlt || isCropped) && !hideBadges ? ( + {hasAlt || isCropped ? ( {isCropped && ( void @@ -42,8 +42,6 @@ export function GalleryItem({ onPress, onPressIn, onLongPress, - viewContext, - isWithinQuote, insetBorderStyle, containerRefs, thumbDimsRef, @@ -53,9 +51,6 @@ export function GalleryItem({ const largeAltBadge = useLargeAltBadgeEnabled() const image = images[index] const hasAlt = !!image.alt - const hideBadges = - isWithinQuote ?? - viewContext === PostEmbedViewContext.FeedEmbedRecordWithMedia const aspect = image.aspectRatio && image.aspectRatio.height > 0 @@ -114,26 +109,24 @@ export function GalleryItem({ - {hasAlt && !hideBadges ? ( + {hasAlt ? (