Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3352492
D3972.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D3972.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
@@ -10,7 +10,7 @@
import NodeHeightMeasurer from '../components/node-height-measurer.react';
import { InputStateContext } from '../input/input-state';
import type { MeasurementTask } from './chat-context-provider.react';
-import { chatMessageItemKey } from './chat-list.react';
+import { chatMessageItemKey } from './chat-message-constants';
import { useComposedMessageMaxWidth } from './composed-message-width';
import { dummyNodeForRobotextMessageHeightMeasurement } from './inner-robotext-message.react';
import { dummyNodeForTextMessageHeightMeasurement } from './inner-text-message.react';
diff --git a/native/chat/chat-list.react.js b/native/chat/chat-list.react.js
--- a/native/chat/chat-list.react.js
+++ b/native/chat/chat-list.react.js
@@ -12,8 +12,7 @@
View,
} from 'react-native';
-import type { ChatMessageItem } from 'lib/selectors/chat-selectors';
-import { localIDPrefix, messageKey } from 'lib/shared/message-utils';
+import { localIDPrefix } from 'lib/shared/message-utils';
import {
type KeyboardState,
@@ -24,19 +23,11 @@
import type { ChatMessageItemWithHeight } from '../types/chat-types';
import type { ScrollEvent } from '../types/react-native';
import type { ViewStyle } from '../types/styles';
+import { chatMessageItemKey } from './chat-message-constants';
import type { ChatNavigationProp } from './chat.react';
import NewMessagesPill from './new-messages-pill.react';
import { chatMessageItemHeight } from './utils';
-function chatMessageItemKey(
- item: ChatMessageItemWithHeight | ChatMessageItem,
-): string {
- if (item.itemType === 'loader') {
- return 'loader';
- }
- return messageKey(item.messageInfo);
-}
-
const animationSpec = {
duration: 150,
useNativeDriver: true,
@@ -303,4 +294,4 @@
},
);
-export { ConnectedChatList as ChatList, chatMessageItemKey };
+export default ConnectedChatList;
diff --git a/native/chat/chat-message-constants.js b/native/chat/chat-message-constants.js
new file mode 100644
--- /dev/null
+++ b/native/chat/chat-message-constants.js
@@ -0,0 +1,15 @@
+// @flow
+
+import type { ChatMessageItem } from 'lib/selectors/chat-selectors';
+import { messageKey } from 'lib/shared/message-utils';
+
+import type { ChatMessageItemWithHeight } from '../types/chat-types';
+
+export function chatMessageItemKey(
+ item: ChatMessageItemWithHeight | ChatMessageItem,
+): string {
+ if (item.itemType === 'loader') {
+ return 'loader';
+ }
+ return messageKey(item.messageInfo);
+}
diff --git a/native/chat/message-list.react.js b/native/chat/message-list.react.js
--- a/native/chat/message-list.react.js
+++ b/native/chat/message-list.react.js
@@ -46,7 +46,7 @@
} from '../types/chat-types';
import type { VerticalBounds } from '../types/layout-types';
import type { ViewableItemsChange } from '../types/react-native';
-import { ChatList } from './chat-list.react';
+import ChatList from './chat-list.react';
import type { ChatNavigationProp } from './chat.react';
import { Message } from './message.react';
import RelationshipPrompt from './relationship-prompt.react';
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 24, 6:08 AM (21 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2574238
Default Alt Text
D3972.diff (3 KB)
Attached To
Mode
D3972: [native] [reactor] [ENG-530] fix hot reload export issue in chat message
Attached
Detach File
Event Timeline
Log In to Comment