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 @@ -139,7 +139,7 @@ +joinThread: (request: ClientThreadJoinRequest) => Promise, +inputState: ?InputState, +userSearchIndex: SearchIndex, - +threadMembers: $ReadOnlyArray, + +mentionsCandidates: $ReadOnlyArray, +parentThreadInfo: ?ThreadInfo, }; type State = { @@ -477,7 +477,7 @@ const suggestedUsers = getTypeaheadUserSuggestions( this.props.userSearchIndex, - this.props.threadMembers, + this.props.mentionsCandidates, this.props.viewerID, typeaheadMatchedStrings.usernamePrefix, ); @@ -939,7 +939,7 @@ const callJoinThread = useServerCall(joinThread); const userSearchIndex = useSelector(userStoreSearchIndex); - const threadMembers = useSelector( + const mentionsCandidates = useSelector( relativeMemberInfoSelectorForMembersOfThread(props.threadInfo.id), ); @@ -967,7 +967,7 @@ joinThread={callJoinThread} inputState={inputState} userSearchIndex={userSearchIndex} - threadMembers={threadMembers} + mentionsCandidates={mentionsCandidates} parentThreadInfo={parentThreadInfo} /> ); 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 @@ -549,7 +549,7 @@ const dispatchActionPromise = useDispatchActionPromise(); const callJoinThread = useServerCall(joinThread); const userSearchIndex = useSelector(userStoreSearchIndex); - const threadMembers = useSelector( + const mentionsCandidates = useSelector( relativeMemberInfoSelectorForMembersOfThread(props.threadInfo.id), ); @@ -582,11 +582,11 @@ if (props.inputState.typeaheadState.keepUpdatingThreadMembers) { const setter = props.inputState.setTypeaheadState; setter({ - frozenThreadMembers: threadMembers, + frozenMentionsCandidates: mentionsCandidates, }); } }, [ - threadMembers, + mentionsCandidates, props.inputState.setTypeaheadState, props.inputState.typeaheadState.keepUpdatingThreadMembers, ]); @@ -598,13 +598,13 @@ } return getTypeaheadUserSuggestions( userSearchIndex, - props.inputState.typeaheadState.frozenThreadMembers, + props.inputState.typeaheadState.frozenMentionsCandidates, viewerID, typeaheadMatchedStrings.usernamePrefix, ); }, [ userSearchIndex, - props.inputState.typeaheadState.frozenThreadMembers, + props.inputState.typeaheadState.frozenMentionsCandidates, viewerID, typeaheadMatchedStrings, ]); diff --git a/web/input/input-state-container.react.js b/web/input/input-state-container.react.js --- a/web/input/input-state-container.react.js +++ b/web/input/input-state-container.react.js @@ -153,7 +153,7 @@ typeaheadState: { canBeVisible: false, keepUpdatingThreadMembers: true, - frozenThreadMembers: [], + frozenMentionsCandidates: [], moveChoiceUp: null, moveChoiceDown: null, close: null, diff --git a/web/input/input-state.js b/web/input/input-state.js --- a/web/input/input-state.js +++ b/web/input/input-state.js @@ -37,7 +37,7 @@ export type TypeaheadState = { +canBeVisible: boolean, +keepUpdatingThreadMembers: boolean, - +frozenThreadMembers: $ReadOnlyArray, + +frozenMentionsCandidates: $ReadOnlyArray, +moveChoiceUp: ?() => void, +moveChoiceDown: ?() => void, +close: ?() => void,