Page MenuHomePhabricator

D8839.id30021.diff
No OneTemporary

D8839.id30021.diff

diff --git a/native/chat/composed-message.react.js b/native/chat/composed-message.react.js
--- a/native/chat/composed-message.react.js
+++ b/native/chat/composed-message.react.js
@@ -209,27 +209,13 @@
);
}
- const viewStyle = [styles.alignment];
- if (!__DEV__) {
- // We don't force view height in dev mode because we
- // want to measure it in Message to see if it's correct
- if (item.messageShapeType === 'text') {
- viewStyle.push({ height: item.contentHeight });
- } else if (item.messageShapeType === 'multimedia') {
- const height = item.inlineEngagementHeight
- ? item.contentHeight + item.inlineEngagementHeight
- : item.contentHeight;
- viewStyle.push({ height });
- }
- }
-
return (
<View {...viewProps}>
<AnimatedView style={{ opacity: contentAndHeaderOpacity }}>
<MessageHeader item={item} focused={focused} display="lowContrast" />
</AnimatedView>
<AnimatedView style={[containerStyle, editedMessageStyle]}>
- <View style={viewStyle}>
+ <View style={styles.alignment}>
<View style={[styles.content, alignStyle]}>
{deliveryIcon}
{messageBox}
diff --git a/native/chat/failed-send.react.js b/native/chat/failed-send.react.js
--- a/native/chat/failed-send.react.js
+++ b/native/chat/failed-send.react.js
@@ -139,7 +139,6 @@
paddingHorizontal: 3,
},
failedSendInfo: {
- flex: 1,
flexDirection: 'row',
justifyContent: 'flex-end',
marginRight: 20,
diff --git a/native/chat/message.react.js b/native/chat/message.react.js
--- a/native/chat/message.react.js
+++ b/native/chat/message.react.js
@@ -64,6 +64,13 @@
}
render() {
+ const viewStyle = {};
+ if (!__DEV__) {
+ // We don't force view height in dev mode because we
+ // want to measure it in the onLayout below to see if it's correct
+ viewStyle.height = messageItemHeight(this.props.item);
+ }
+
let message;
if (this.props.item.messageShapeType === 'text') {
message = (
@@ -75,6 +82,7 @@
toggleFocus={this.props.toggleFocus}
verticalBounds={this.props.verticalBounds}
shouldDisplayPinIndicator={this.props.shouldDisplayPinIndicator}
+ style={viewStyle}
/>
);
} else if (this.props.item.messageShapeType === 'multimedia') {
@@ -85,6 +93,7 @@
toggleFocus={this.props.toggleFocus}
verticalBounds={this.props.verticalBounds}
shouldDisplayPinIndicator={this.props.shouldDisplayPinIndicator}
+ style={viewStyle}
/>
);
} else {
@@ -96,6 +105,7 @@
focused={this.props.focused}
toggleFocus={this.props.toggleFocus}
verticalBounds={this.props.verticalBounds}
+ style={viewStyle}
/>
);
}
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
@@ -196,19 +196,12 @@
const contentAndHeaderOpacity = useContentAndHeaderOpacity(item);
- const viewStyle = {};
- if (!__DEV__) {
- // We don't force view height in dev mode because we
- // want to measure it in Message to see if it's correct
- viewStyle.height = item.contentHeight;
- }
-
return (
<View {...viewProps}>
<AnimatedView style={{ opacity: contentAndHeaderOpacity }}>
{timestamp}
</AnimatedView>
- <View onLayout={onLayout} ref={viewRef} style={viewStyle}>
+ <View onLayout={onLayout} ref={viewRef}>
<AnimatedView style={{ opacity: contentAndHeaderOpacity }}>
<InnerRobotextMessage
item={item}

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 8, 11:55 PM (4 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2824322
Default Alt Text
D8839.id30021.diff (3 KB)

Event Timeline