diff --git a/native/chat/multimedia-message.react.js b/native/chat/multimedia-message.react.js --- a/native/chat/multimedia-message.react.js +++ b/native/chat/multimedia-message.react.js @@ -142,13 +142,11 @@ const aboveMargin = isViewer ? 30 : 50; const aboveSpace = multimediaMessageTooltipHeight + aboveMargin; - let location = 'below', - margin = belowMargin; + let margin = belowMargin; if ( multimediaBottom + belowSpace > boundsBottom && multimediaTop - aboveSpace > boundsTop ) { - location = 'above'; margin = aboveMargin; } @@ -159,7 +157,7 @@ item, initialCoordinates: coordinates, verticalBounds, - location, + location: 'fixed', margin, visibleEntryIDs, }, diff --git a/native/chat/robotext-message.react.js b/native/chat/robotext-message.react.js --- a/native/chat/robotext-message.react.js +++ b/native/chat/robotext-message.react.js @@ -105,13 +105,11 @@ const aboveMargin = isViewer ? 30 : 50; const aboveSpace = robotextMessageTooltipHeight + aboveMargin; - let location = 'below', - margin = 0; + let margin = 0; if ( messageBottom + belowSpace > boundsBottom && messageTop - aboveSpace > boundsTop ) { - location = 'above'; margin = aboveMargin; } @@ -122,7 +120,7 @@ initialCoordinates: coordinates, verticalBounds, visibleEntryIDs, - location, + location: 'fixed', margin, item, }, diff --git a/native/chat/text-message.react.js b/native/chat/text-message.react.js --- a/native/chat/text-message.react.js +++ b/native/chat/text-message.react.js @@ -169,13 +169,11 @@ const aboveMargin = isViewer ? 30 : 50; const aboveSpace = textMessageTooltipHeight + aboveMargin; - let location = 'below', - margin = belowMargin; + let margin = belowMargin; if ( messageBottom + belowSpace > boundsBottom && messageTop - aboveSpace > boundsTop ) { - location = 'above'; margin = aboveMargin; } @@ -186,7 +184,7 @@ initialCoordinates: coordinates, verticalBounds, visibleEntryIDs, - location, + location: 'fixed', margin, item, }, diff --git a/native/navigation/tooltip.react.js b/native/navigation/tooltip.react.js --- a/native/navigation/tooltip.react.js +++ b/native/navigation/tooltip.react.js @@ -78,7 +78,7 @@ +presentedFrom: string, +initialCoordinates: LayoutCoordinates, +verticalBounds: VerticalBounds, - +location?: 'above' | 'below', + +location?: 'above' | 'below' | 'fixed', +margin?: number, +visibleEntryIDs?: $ReadOnlyArray, }; @@ -230,7 +230,7 @@ return tooltipHeight(this.entries.length); } - get location(): 'above' | 'below' { + get location(): 'above' | 'below' | 'fixed' { const { params } = this.props.route; const { location } = params; if (location) {