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 @@ -22,11 +22,7 @@ sortMessageInfoList, } from '../shared/message-utils.js'; import { messageSpecs } from '../shared/messages/message-specs.js'; -import { - threadInChatList, - threadIsPending, - threadIsTopLevel, -} from '../shared/thread-utils.js'; +import { threadInChatList, threadIsPending } from '../shared/thread-utils.js'; import { messageTypes } from '../types/message-types-enum.js'; import { type ComposableMessageInfo, @@ -204,29 +200,6 @@ }; } -const chatListData: (state: BaseAppState<>) => $ReadOnlyArray = - createSelector( - threadInfoSelector, - (state: BaseAppState<>) => state.messageStore, - messageInfoSelector, - sidebarInfoSelector, - ( - threadInfos: { - +[id: string]: ThreadInfo, - }, - messageStore: MessageStore, - messageInfos: { +[id: string]: ?MessageInfo }, - sidebarInfos: { +[id: string]: $ReadOnlyArray }, - ): $ReadOnlyArray => - getChatThreadItems( - threadInfos, - messageStore, - messageInfos, - sidebarInfos, - threadIsTopLevel, - ), - ); - function useFlattenedChatListData(): $ReadOnlyArray { return useFilteredChatListData(threadInChatList); } @@ -736,7 +709,6 @@ export { messageInfoSelector, createChatThreadItem, - chatListData, createChatMessageItems, messageListData, useFlattenedChatListData,