diff --git a/lib/shared/mention-utils.js b/lib/shared/mention-utils.js --- a/lib/shared/mention-utils.js +++ b/lib/shared/mention-utils.js @@ -1,7 +1,7 @@ // @flow import { oldValidUsernameRegexString } from './account-utils.js'; -import SearchIndex from './search-index.js'; +import SentencePrefixSearchIndex from './sentence-prefix-search-index.js'; import { threadOtherMembers, validChatNameRegexString, @@ -78,7 +78,7 @@ } function getMentionTypeaheadUserSuggestions( - userSearchIndex: SearchIndex, + userSearchIndex: SentencePrefixSearchIndex, threadMembers: $ReadOnlyArray, viewerID: ?string, usernamePrefix: string, diff --git a/native/chat/chat-input-bar.react.js b/native/chat/chat-input-bar.react.js --- a/native/chat/chat-input-bar.react.js +++ b/native/chat/chat-input-bar.react.js @@ -33,7 +33,7 @@ } from 'lib/actions/thread-actions.js'; import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js'; import { threadInfoSelector } from 'lib/selectors/thread-selectors.js'; -import { userStoreSearchIndex } from 'lib/selectors/user-selectors.js'; +import { userStoreMentionSearchIndex } from 'lib/selectors/user-selectors.js'; import { colorIsDark } from 'lib/shared/color-utils.js'; import { useEditMessage } from 'lib/shared/edit-messages-utils.js'; import { @@ -49,7 +49,7 @@ messageKey, type MessagePreviewResult, } from 'lib/shared/message-utils.js'; -import SearchIndex from 'lib/shared/search-index.js'; +import SentencePrefixSearchIndex from 'lib/shared/sentence-prefix-search-index.js'; import { threadHasPermission, viewerIsMember, @@ -171,7 +171,7 @@ +dispatchActionPromise: DispatchActionPromise, +joinThread: (request: ClientThreadJoinRequest) => Promise, +inputState: ?InputState, - +userSearchIndex: SearchIndex, + +userSearchIndex: SentencePrefixSearchIndex, +userMentionsCandidates: $ReadOnlyArray, +parentThreadInfo: ?ThreadInfo, +editedMessagePreview: ?MessagePreviewResult, @@ -1253,7 +1253,7 @@ const dispatchActionPromise = useDispatchActionPromise(); const callJoinThread = useServerCall(joinThread); - const userSearchIndex = useSelector(userStoreSearchIndex); + const userSearchIndex = useSelector(userStoreMentionSearchIndex); const { parentThreadID } = props.threadInfo; const parentThreadInfo = useSelector(state => diff --git a/web/chat/chat-input-bar.react.js b/web/chat/chat-input-bar.react.js --- a/web/chat/chat-input-bar.react.js +++ b/web/chat/chat-input-bar.react.js @@ -12,7 +12,7 @@ import SWMansionIcon from 'lib/components/SWMansionIcon.react.js'; import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js'; import { threadInfoSelector } from 'lib/selectors/thread-selectors.js'; -import { userStoreSearchIndex } from 'lib/selectors/user-selectors.js'; +import { userStoreMentionSearchIndex } from 'lib/selectors/user-selectors.js'; import { getMentionTypeaheadUserSuggestions, getTypeaheadRegexMatches, @@ -571,7 +571,7 @@ const calendarQuery = useSelector(nonThreadCalendarQuery); const dispatchActionPromise = useDispatchActionPromise(); const callJoinThread = useServerCall(joinThread); - const userSearchIndex = useSelector(userStoreSearchIndex); + const userSearchIndex = useSelector(userStoreMentionSearchIndex); const { parentThreadID } = props.threadInfo; const parentThreadInfo = useSelector(state =>