diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js --- a/lib/shared/thread-utils.js +++ b/lib/shared/thread-utils.js @@ -1852,6 +1852,7 @@ ]); } +// eslint-disable-next-line no-unused-vars function useChatMentionSearchIndex(): { +[id: string]: SentencePrefixSearchIndex, } { @@ -1880,20 +1881,12 @@ }, [chatMentionCandidatesObj]); } +const emptySearchIndex = new SentencePrefixSearchIndex(); function useThreadChatMentionSearchIndex( + // eslint-disable-next-line no-unused-vars threadInfo: ThreadInfo, ): SentencePrefixSearchIndex { - const chatMentionCandidatesSearchIndex = useChatMentionSearchIndex(); - const { communityThreadIDForGenesisThreads } = - useChatMentionCandidatesObjAndUtils(); - if (threadInfo.community === genesis.id) { - return chatMentionCandidatesSearchIndex[ - communityThreadIDForGenesisThreads[threadInfo.id] - ]; - } - return chatMentionCandidatesSearchIndex[ - threadInfo.community ?? threadInfo.id - ]; + return emptySearchIndex; } export {