Page MenuHomePhabricator

D13821.id45471.diff
No OneTemporary

D13821.id45471.diff

diff --git a/lib/selectors/chat-selectors.js b/lib/selectors/chat-selectors.js
--- a/lib/selectors/chat-selectors.js
+++ b/lib/selectors/chat-selectors.js
@@ -214,38 +214,22 @@
return React.useMemo(
() =>
- getChatThreadItems(
- threadInfos,
- messageStore,
- messageInfos,
- sidebarInfos,
- filterFunction,
- ),
+ _flow(
+ _filter(filterFunction),
+ _map((threadInfo: ThreadInfo): ChatThreadItem =>
+ createChatThreadItem(
+ threadInfo,
+ messageStore,
+ messageInfos,
+ sidebarInfos[threadInfo.id],
+ ),
+ ),
+ _orderBy('lastUpdatedTimeIncludingSidebars')('desc'),
+ )(threadInfos),
[messageInfos, messageStore, sidebarInfos, filterFunction, threadInfos],
);
}
-function getChatThreadItems(
- threadInfos: { +[id: string]: ThreadInfo },
- messageStore: MessageStore,
- messageInfos: { +[id: string]: ?MessageInfo },
- sidebarInfos: { +[id: string]: $ReadOnlyArray<SidebarInfo> },
- filterFunction: (threadInfo: ?(ThreadInfo | RawThreadInfo)) => boolean,
-): $ReadOnlyArray<ChatThreadItem> {
- return _flow(
- _filter(filterFunction),
- _map((threadInfo: ThreadInfo): ChatThreadItem =>
- createChatThreadItem(
- threadInfo,
- messageStore,
- messageInfos,
- sidebarInfos[threadInfo.id],
- ),
- ),
- _orderBy('lastUpdatedTimeIncludingSidebars')('desc'),
- )(threadInfos);
-}
-
export type RobotextChatMessageInfoItem = {
+itemType: 'message',
+messageInfoType: 'robotext',

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 30, 12:23 AM (21 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2598785
Default Alt Text
D13821.id45471.diff (1 KB)

Event Timeline