Page MenuHomePhabricator

D8097.id27458.diff
No OneTemporary

D8097.id27458.diff

diff --git a/native/chat/message-results-screen.react.js b/native/chat/message-results-screen.react.js
--- a/native/chat/message-results-screen.react.js
+++ b/native/chat/message-results-screen.react.js
@@ -68,8 +68,13 @@
return [];
}
+ const pinnedMessageIDs = new Set();
+ translatedMessageResults.forEach(item => pinnedMessageIDs.add(item.id));
+
const chatMessageInfoItems = chatMessageInfos.filter(
- item => item.itemType === 'message' && item.isPinned,
+ item =>
+ item.itemType === 'message' &&
+ pinnedMessageIDs.has(item.messageInfo.id),
);
// By the nature of using messageListData and passing in
@@ -94,7 +99,7 @@
}
return sortedChatMessageInfoItems.filter(Boolean);
- }, [chatMessageInfos, rawMessageResults]);
+ }, [translatedMessageResults, chatMessageInfos, rawMessageResults]);
const measureCallback = React.useCallback(
(listDataWithHeights: $ReadOnlyArray<ChatMessageItemWithHeight>) => {

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 27, 1:32 PM (18 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2590552
Default Alt Text
D8097.id27458.diff (994 B)

Event Timeline