Fix some issues with message spacing (#10553)

This commit is contained in:
DS Boyce
2026-05-19 13:06:21 -07:00
committed by GitHub
parent 7b6a81ac23
commit 34ae819aab
2 changed files with 9 additions and 6 deletions
+5 -3
View File
@@ -438,6 +438,7 @@ let MessageItem = ({
isFromSelf={isFromSelf} isFromSelf={isFromSelf}
squaredBottomCorner={squaredBottomCorner || hasEmbedAndText} squaredBottomCorner={squaredBottomCorner || hasEmbedAndText}
squaredTopCorner={squaredTopCorner} squaredTopCorner={squaredTopCorner}
isFirstInCluster={isFirstInCluster}
/> />
)} )}
{rt.text.length > 0 && ( {rt.text.length > 0 && (
@@ -452,9 +453,10 @@ let MessageItem = ({
a.py_sm, a.py_sm,
a.px_md, a.px_md,
{ {
marginTop: isFirstInCluster marginTop:
? 0 hasEmbedAndText || !isFirstInCluster
: CLUSTERED_MESSAGE_GAP, ? CLUSTERED_MESSAGE_GAP
: 0,
backgroundColor: isFromSelf backgroundColor: isFromSelf
? isPending ? isPending
? pendingColor ? pendingColor
+4 -3
View File
@@ -15,11 +15,13 @@ let MessageItemEmbed = ({
isFromSelf, isFromSelf,
squaredTopCorner, squaredTopCorner,
squaredBottomCorner, squaredBottomCorner,
isFirstInCluster,
}: { }: {
embed: $Typed<AppBskyEmbedRecord.View> embed: $Typed<AppBskyEmbedRecord.View>
isFromSelf: boolean isFromSelf: boolean
squaredTopCorner: boolean squaredTopCorner: boolean
squaredBottomCorner: boolean squaredBottomCorner: boolean
isFirstInCluster: boolean
}): React.ReactNode => { }): React.ReactNode => {
const t = useTheme() const t = useTheme()
const screen = useWindowDimensions() const screen = useWindowDimensions()
@@ -34,15 +36,14 @@ let MessageItemEmbed = ({
width: Math.min(screen.width, 600) / 1.4, width: Math.min(screen.width, 600) / 1.4,
}), }),
web({ web({
width: '100%',
minWidth: 280, minWidth: 280,
maxWidth: 360, maxWidth: 360,
}), }),
{ {
marginTop: CLUSTERED_MESSAGE_GAP, marginTop: isFirstInCluster ? 0 : CLUSTERED_MESSAGE_GAP,
}, },
]}> ]}>
<View style={{marginTop: -8}}> <View>
<Embed <Embed
embed={embed} embed={embed}
allowNestedQuotes allowNestedQuotes