Page MenuHomePhabricator

D6053.id20175.diff
No OneTemporary

D6053.id20175.diff

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
@@ -156,6 +156,20 @@
'none',
);
}
+
+ if (
+ this.props.suggestedUsers.length === 0 &&
+ this.props.inputState.typeaheadState.frozenSuggestedUsers.length !== 0
+ ) {
+ this.props.inputState.setTypeaheadState({ frozenSuggestedUsers: [] });
+ } else if (
+ this.props.suggestedUsers.length !== 0 &&
+ this.props.inputState.typeaheadState.frozenSuggestedUsers.length === 0
+ ) {
+ this.props.inputState.setTypeaheadState({
+ frozenSuggestedUsers: this.props.suggestedUsers,
+ });
+ }
}
static unassignedUploadIDs(
@@ -350,7 +364,9 @@
inputState={this.props.inputState}
textarea={this.textarea}
matchedStrings={this.props.typeaheadMatchedStrings}
- suggestedUsers={this.props.suggestedUsers}
+ suggestedUsers={
+ this.props.inputState.typeaheadState.frozenSuggestedUsers
+ }
/>
);
}
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
@@ -144,6 +144,7 @@
textCursorPositions: {},
typeaheadState: {
canBeVisible: false,
+ frozenSuggestedUsers: [],
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
@@ -8,7 +8,7 @@
type MediaMissionStep,
} from 'lib/types/media-types';
import type { RawTextMessageInfo } from 'lib/types/messages/text';
-import type { ThreadInfo } from 'lib/types/thread-types';
+import type { ThreadInfo, RelativeMemberInfo } from 'lib/types/thread-types';
export type PendingMultimediaUpload = {
localID: string,
@@ -36,6 +36,7 @@
export type TypeaheadState = {
+canBeVisible: boolean,
+ +frozenSuggestedUsers: $ReadOnlyArray<RelativeMemberInfo>,
+moveChoiceUp: ?() => void,
+moveChoiceDown: ?() => void,
+close: ?() => void,

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 1:57 AM (17 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2577982
Default Alt Text
D6053.id20175.diff (2 KB)

Event Timeline