[Chat] Message context menu fixes (#10314)
This commit is contained in:
@@ -33,7 +33,7 @@ export function EmojiReactionPicker({
|
||||
const t = useTheme()
|
||||
const isFromSelf = message.sender?.did === currentAccount?.did
|
||||
const {measurement, close} = useContextMenuContext()
|
||||
const {align} = useContextMenuMenuContext()
|
||||
const {align, xOffset} = useContextMenuMenuContext()
|
||||
const [layout, setLayout] = useState({width: 0, height: 0})
|
||||
const {width: screenWidth} = useWindowDimensions()
|
||||
|
||||
@@ -44,12 +44,15 @@ export function EmojiReactionPicker({
|
||||
|
||||
const position = useMemo(() => {
|
||||
return {
|
||||
x: align === 'left' ? 12 : screenWidth - layout.width - 12,
|
||||
x:
|
||||
align === 'left'
|
||||
? (measurement?.x ?? 0) + xOffset
|
||||
: (measurement?.x ?? 0) + (measurement?.width ?? 0) - layout.width,
|
||||
y: (measurement?.y ?? 0) - tokens.space.xs - layout.height,
|
||||
height: layout.height,
|
||||
width: layout.width,
|
||||
}
|
||||
}, [measurement, align, screenWidth, layout])
|
||||
}, [measurement, align, xOffset, screenWidth, layout])
|
||||
|
||||
const limitReacted = hasReachedReactionLimit(message, currentAccount?.did)
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ let MessageItemEmbed = ({
|
||||
<View
|
||||
style={[
|
||||
!isFromSelf && a.ml_sm,
|
||||
t.atoms.bg,
|
||||
native({
|
||||
flexBasis: 0,
|
||||
width: Math.min(screen.width, 600) / 1.4,
|
||||
|
||||
Reference in New Issue
Block a user