Page MenuHomePhabricator

D5812.diff
No OneTemporary

D5812.diff

diff --git a/native/chat/chat-item-height-measurer.react.js b/native/chat/chat-item-height-measurer.react.js
--- a/native/chat/chat-item-height-measurer.react.js
+++ b/native/chat/chat-item-height-measurer.react.js
@@ -93,6 +93,7 @@
endsCluster: item.endsCluster,
threadCreatedFromMessage: item.threadCreatedFromMessage,
pendingUploads,
+ reactions: item.reactions,
...sizes,
};
}
@@ -117,6 +118,7 @@
endsCluster: item.endsCluster,
threadCreatedFromMessage: item.threadCreatedFromMessage,
contentHeight: height,
+ reactions: item.reactions,
};
} else {
invariant(
@@ -134,6 +136,7 @@
threadCreatedFromMessage: item.threadCreatedFromMessage,
robotext: item.robotext,
contentHeight: height,
+ reactions: item.reactions,
};
}
},
diff --git a/native/chat/multimedia-message-utils.js b/native/chat/multimedia-message-utils.js
--- a/native/chat/multimedia-message-utils.js
+++ b/native/chat/multimedia-message-utils.js
@@ -117,7 +117,7 @@
if (multimediaMessageSendFailed(item)) {
height += failedSendHeight;
}
- if (item.threadCreatedFromMessage) {
+ if (item.threadCreatedFromMessage || item.reactions.size > 0) {
height +=
inlineSidebarStyle.height +
inlineSidebarStyle.marginTop +
diff --git a/native/chat/utils.js b/native/chat/utils.js
--- a/native/chat/utils.js
+++ b/native/chat/utils.js
@@ -64,7 +64,7 @@
if (textMessageSendFailed(item)) {
height += failedSendHeight;
}
- if (item.threadCreatedFromMessage) {
+ if (item.threadCreatedFromMessage || item.reactions.size > 0) {
height +=
inlineSidebarStyle.height +
inlineSidebarStyle.marginTop +
@@ -76,7 +76,7 @@
function robotextMessageItemHeight(
item: ChatRobotextMessageInfoItemWithHeight,
): number {
- if (item.threadCreatedFromMessage) {
+ if (item.threadCreatedFromMessage || item.reactions.size > 0) {
return item.contentHeight + inlineSidebarStyle.height;
}
return item.contentHeight;
diff --git a/native/types/chat-types.js b/native/types/chat-types.js
--- a/native/types/chat-types.js
+++ b/native/types/chat-types.js
@@ -1,5 +1,6 @@
// @flow
+import type { MessageReactionInfo } from 'lib/selectors/chat-selectors';
import type {
LocalMessageInfo,
MultimediaMessageInfo,
@@ -21,6 +22,7 @@
+robotext: string,
+threadCreatedFromMessage: ?ThreadInfo,
+contentHeight: number,
+ +reactions: $ReadOnlyMap<string, MessageReactionInfo>,
};
export type ChatTextMessageInfoItemWithHeight = {
@@ -34,6 +36,7 @@
+endsCluster: boolean,
+contentHeight: number,
+threadCreatedFromMessage: ?ThreadInfo,
+ +reactions: $ReadOnlyMap<string, MessageReactionInfo>,
};
export type MultimediaContentSizes = {
@@ -53,6 +56,7 @@
+endsCluster: boolean,
+threadCreatedFromMessage: ?ThreadInfo,
+pendingUploads: ?MessagePendingUploads,
+ +reactions: $ReadOnlyMap<string, MessageReactionInfo>,
};
export type ChatMessageInfoItemWithHeight =

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 5:41 AM (21 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2578543
Default Alt Text
D5812.diff (3 KB)

Event Timeline