Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3490080
D6665.id22275.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D6665.id22275.diff
View Options
diff --git a/native/chat/chat-context-provider.react.js b/native/chat/chat-context-provider.react.js
--- a/native/chat/chat-context-provider.react.js
+++ b/native/chat/chat-context-provider.react.js
@@ -36,7 +36,7 @@
const measureMessages = React.useCallback(
(
- messages: $ReadOnlyArray<ChatMessageItem>,
+ messages: ?$ReadOnlyArray<ChatMessageItem>,
threadInfo: ?ThreadInfo,
onMessagesMeasured: ($ReadOnlyArray<ChatMessageItemWithHeight>) => mixed,
measurerID: number,
@@ -48,6 +48,10 @@
return;
}
+ if (!messages) {
+ return;
+ }
+
const measureCallback = (
messagesWithHeight: $ReadOnlyArray<ChatMessageItemWithHeight>,
newMeasuredHeights: $ReadOnlyMap<string, number>,
@@ -88,7 +92,7 @@
const measurerID = nextMeasurerID.current++;
return {
measure: (
- messages: $ReadOnlyArray<ChatMessageItem>,
+ messages: ?$ReadOnlyArray<ChatMessageItem>,
threadInfo: ?ThreadInfo,
onMessagesMeasured: (
$ReadOnlyArray<ChatMessageItemWithHeight>,
diff --git a/native/chat/chat-context.js b/native/chat/chat-context.js
--- a/native/chat/chat-context.js
+++ b/native/chat/chat-context.js
@@ -10,7 +10,7 @@
import type { ChatMessageItemWithHeight } from '../types/chat-types';
export type MessagesMeasurer = (
- $ReadOnlyArray<ChatMessageItem>,
+ ?$ReadOnlyArray<ChatMessageItem>,
?ThreadInfo,
($ReadOnlyArray<ChatMessageItemWithHeight>) => mixed,
) => void;
diff --git a/native/chat/message-list-container.react.js b/native/chat/message-list-container.react.js
--- a/native/chat/message-list-container.react.js
+++ b/native/chat/message-list-container.react.js
@@ -58,7 +58,7 @@
+userSearchResults: $ReadOnlyArray<UserListItem>,
+threadInfo: ThreadInfo,
+genesisThreadInfo: ?ThreadInfo,
- +messageListData: $ReadOnlyArray<ChatMessageItem>,
+ +messageListData: ?$ReadOnlyArray<ChatMessageItem>,
+colors: Colors,
+styles: typeof unboundStyles,
// withOverlayContext
@@ -327,10 +327,6 @@
userInfoInputArray,
threadInfo,
});
- invariant(
- messageListData,
- 'messageListData must be specified in messageListContainer',
- );
const colors = useColors();
const styles = useStyles(unboundStyles);
const overlayContext = React.useContext(OverlayContext);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 2:51 PM (21 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2677205
Default Alt Text
D6665.id22275.diff (2 KB)
Attached To
Mode
D6665: [native] Fixed crash when logging out while thread opened
Attached
Detach File
Event Timeline
Log In to Comment