Page MenuHomePhabricator

D6807.diff
No OneTemporary

D6807.diff

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<ThreadJoinPayload>,
+inputState: ?InputState,
+userSearchIndex: SearchIndex,
- +threadMembers: $ReadOnlyArray<RelativeMemberInfo>,
+ +mentionsCandidates: $ReadOnlyArray<RelativeMemberInfo>,
+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<RelativeMemberInfo>,
+ +frozenMentionsCandidates: $ReadOnlyArray<RelativeMemberInfo>,
+moveChoiceUp: ?() => void,
+moveChoiceDown: ?() => void,
+close: ?() => void,

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 3:30 PM (21 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2498126
Default Alt Text
D6807.diff (3 KB)

Event Timeline