Squash carousel in chat messages, fix rounding (#10286)

This commit is contained in:
Eric Bailey
2026-04-17 14:24:42 -05:00
committed by GitHub
parent 43108533eb
commit 587dc8dfe8
4 changed files with 17 additions and 20 deletions
+8 -4
View File
@@ -103,7 +103,14 @@ 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 (bps.gtMobile) {
return 300
} else if (bps.gtPhone) {
@@ -111,10 +118,7 @@ export function Gallery({
} else {
return 200
}
}, [bps])
const isWithinQuote =
viewContext === PostEmbedViewContext.FeedEmbedRecordWithMedia
const hideBadges = isWithinQuote
}, [bps, isWithinChat])
/*
* Container overflow styles