Display chat message underneath embed, not above (#10423)
This commit is contained in:
@@ -182,13 +182,11 @@ let MessageItem = ({
|
|||||||
const hasEmbedAndText =
|
const hasEmbedAndText =
|
||||||
AppBskyEmbedRecord.isView(message.embed) && rt.text.length > 0
|
AppBskyEmbedRecord.isView(message.embed) && rt.text.length > 0
|
||||||
|
|
||||||
const targetBottomRadius =
|
const targetBottomRadius = squaredBottomCorner
|
||||||
squaredBottomCorner || hasEmbedAndText
|
|
||||||
? SQUARED_BORDER_RADIUS
|
|
||||||
: BORDER_RADIUS
|
|
||||||
const targetTopRadius = squaredTopCorner
|
|
||||||
? SQUARED_BORDER_RADIUS
|
? SQUARED_BORDER_RADIUS
|
||||||
: BORDER_RADIUS
|
: BORDER_RADIUS
|
||||||
|
const targetTopRadius =
|
||||||
|
squaredTopCorner || hasEmbedAndText ? SQUARED_BORDER_RADIUS : BORDER_RADIUS
|
||||||
|
|
||||||
const bottomRadiusSV = useSharedValue(targetBottomRadius)
|
const bottomRadiusSV = useSharedValue(targetBottomRadius)
|
||||||
const topRadiusSV = useSharedValue(targetTopRadius)
|
const topRadiusSV = useSharedValue(targetTopRadius)
|
||||||
@@ -463,6 +461,14 @@ let MessageItem = ({
|
|||||||
toggleDivider(message.id)
|
toggleDivider(message.id)
|
||||||
}
|
}
|
||||||
}}>
|
}}>
|
||||||
|
{AppBskyEmbedRecord.isView(message.embed) && (
|
||||||
|
<MessageItemEmbed
|
||||||
|
embed={message.embed}
|
||||||
|
isFromSelf={isFromSelf}
|
||||||
|
squaredBottomCorner={squaredBottomCorner || hasEmbedAndText}
|
||||||
|
squaredTopCorner={squaredTopCorner}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
{rt.text.length > 0 && (
|
{rt.text.length > 0 && (
|
||||||
<Animated.View
|
<Animated.View
|
||||||
accessibilityHint={l`Double tap or long press the message to add a reaction`}
|
accessibilityHint={l`Double tap or long press the message to add a reaction`}
|
||||||
@@ -514,14 +520,6 @@ let MessageItem = ({
|
|||||||
/>
|
/>
|
||||||
</Animated.View>
|
</Animated.View>
|
||||||
)}
|
)}
|
||||||
{AppBskyEmbedRecord.isView(message.embed) && (
|
|
||||||
<MessageItemEmbed
|
|
||||||
embed={message.embed}
|
|
||||||
isFromSelf={isFromSelf}
|
|
||||||
squaredBottomCorner={squaredBottomCorner}
|
|
||||||
squaredTopCorner={squaredTopCorner || hasEmbedAndText}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
{appliedReactions}
|
{appliedReactions}
|
||||||
</ActionsWrapper>
|
</ActionsWrapper>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user