Page MenuHomePhabricator

D8902.diff
No OneTemporary

D8902.diff

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, chatNameMaxLength } from './thread-utils.js';
import { stringForUserExplicit } from './user-utils.js';
import { threadTypes } from '../types/thread-types-enum.js';
@@ -76,7 +76,7 @@
}
function getMentionTypeaheadUserSuggestions(
- userSearchIndex: SearchIndex,
+ userSearchIndex: SentencePrefixSearchIndex,
threadMembers: $ReadOnlyArray<RelativeMemberInfo>,
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<ThreadJoinPayload>,
+inputState: ?InputState,
- +userSearchIndex: SearchIndex,
+ +userSearchIndex: SentencePrefixSearchIndex,
+userMentionsCandidates: $ReadOnlyArray<RelativeMemberInfo>,
+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 =>

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 1:48 AM (18 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2573473
Default Alt Text
D8902.diff (3 KB)

Event Timeline