Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32344808
D5812.1765312842.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D5812.1765312842.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 9, 8:40 PM (18 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5857650
Default Alt Text
D5812.1765312842.diff (3 KB)
Attached To
Mode
D5812: [native] introduced reactions to chat item height measurer
Attached
Detach File
Event Timeline
Log In to Comment