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 @@ -212,7 +212,7 @@ sidebarInfoSelector, ( threadInfos: { - +[id: string]: LegacyThreadInfo | ThreadInfo, + +[id: string]: ThreadInfo, }, messageStore: MessageStore, messageInfos: { +[id: string]: ?MessageInfo }, @@ -255,17 +255,15 @@ } function getChatThreadItems( - threadInfos: { +[id: string]: LegacyThreadInfo | ThreadInfo }, + threadInfos: { +[id: string]: ThreadInfo }, messageStore: MessageStore, messageInfos: { +[id: string]: ?MessageInfo }, sidebarInfos: { +[id: string]: $ReadOnlyArray }, - filterFunction: ( - threadInfo: ?(LegacyThreadInfo | ThreadInfo | RawThreadInfo), - ) => boolean, + filterFunction: (threadInfo: ?(ThreadInfo | RawThreadInfo)) => boolean, ): $ReadOnlyArray { return _flow( _filter(filterFunction), - _map((threadInfo: LegacyThreadInfo | ThreadInfo): ChatThreadItem => + _map((threadInfo: ThreadInfo): ChatThreadItem => createChatThreadItem( threadInfo, messageStore, @@ -317,9 +315,9 @@ threadID: string, messageStore: MessageStore, messageInfos: { +[id: string]: ?MessageInfo }, - threadInfos: { +[id: string]: LegacyThreadInfo | ThreadInfo }, + threadInfos: { +[id: string]: ThreadInfo }, threadInfoFromSourceMessageID: { - +[id: string]: LegacyThreadInfo | ThreadInfo, + +[id: string]: ThreadInfo, }, additionalMessages: $ReadOnlyArray, viewerID: string, @@ -592,10 +590,10 @@ messageStore: MessageStore, messageInfos: { +[id: string]: ?MessageInfo }, threadInfos: { - +[id: string]: LegacyThreadInfo | ThreadInfo, + +[id: string]: ThreadInfo, }, threadInfoFromSourceMessageID: { - +[id: string]: LegacyThreadInfo | ThreadInfo, + +[id: string]: ThreadInfo, }, viewerID: ?string, ): ?(ChatMessageItem[]) => {