diff --git a/web/chat/chat-message-list-container.react.js b/web/chat/chat-message-list-container.react.js
--- a/web/chat/chat-message-list-container.react.js
+++ b/web/chat/chat-message-list-container.react.js
@@ -28,8 +28,7 @@
function ChatMessageListContainer(props: Props): React.Node {
const { activeChatThreadID } = props;
- const { isChatCreation, selectedUserInfos, otherUserInfos } =
- useInfosForPendingThread();
+ const { isChatCreation, selectedUserInfos } = useInfosForPendingThread();
const threadInfo = useThreadInfoForPossiblyPendingThread(activeChatThreadID);
invariant(threadInfo, 'ThreadInfo should be set');
@@ -127,7 +126,6 @@
const chatUserSelection = (
@@ -143,13 +141,7 @@
{messageListAndInput}
>
);
- }, [
- inputState,
- isChatCreation,
- otherUserInfos,
- selectedUserInfos,
- threadInfo,
- ]);
+ }, [inputState, isChatCreation, selectedUserInfos, threadInfo]);
return connectDropTarget(
diff --git a/web/chat/chat-thread-composer.react.js b/web/chat/chat-thread-composer.react.js
--- a/web/chat/chat-thread-composer.react.js
+++ b/web/chat/chat-thread-composer.react.js
@@ -10,6 +10,7 @@
import { useLoggedInUserInfo } from 'lib/hooks/account-hooks.js';
import { useENSNames } from 'lib/hooks/ens-cache.js';
import { useUsersSupportThickThreads } from 'lib/hooks/user-identities-hooks.js';
+import { userInfoSelectorForPotentialMembers } from 'lib/selectors/user-selectors.js';
import {
usePotentialMemberItems,
useSearchUsers,
@@ -36,7 +37,6 @@
type Props = {
+userInfoInputArray: $ReadOnlyArray
,
- +otherUserInfos: { [id: string]: AccountUserInfo },
+threadID: string,
+inputState: InputState,
};
@@ -46,7 +46,7 @@
| 'keep-active-thread';
function ChatThreadComposer(props: Props): React.Node {
- const { userInfoInputArray, otherUserInfos, threadID, inputState } = props;
+ const { userInfoInputArray, threadID, inputState } = props;
const [usernameInputText, setUsernameInputText] = React.useState('');
@@ -60,6 +60,7 @@
const searchResults = useSearchUsers(usernameInputText);
const auxUserInfos = useSelector(state => state.auxUserStore.auxUserInfos);
+ const otherUserInfos = useSelector(userInfoSelectorForPotentialMembers);
const userListItems = usePotentialMemberItems({
text: usernameInputText,
userInfos: otherUserInfos,
diff --git a/web/utils/thread-utils.js b/web/utils/thread-utils.js
--- a/web/utils/thread-utils.js
+++ b/web/utils/thread-utils.js
@@ -6,7 +6,6 @@
import { useLoggedInUserInfo } from 'lib/hooks/account-hooks.js';
import { useUsersSupportThickThreads } from 'lib/hooks/user-identities-hooks.js';
import { threadInfoSelector } from 'lib/selectors/thread-selectors.js';
-import { userInfoSelectorForPotentialMembers } from 'lib/selectors/user-selectors.js';
import {
createPendingThread,
useExistingThreadInfoFinder,
@@ -20,7 +19,6 @@
type InfosForPendingThread = {
+isChatCreation: boolean,
+selectedUserInfos: $ReadOnlyArray,
- +otherUserInfos: { [id: string]: AccountUserInfo },
};
function useInfosForPendingThread(): InfosForPendingThread {
@@ -30,11 +28,9 @@
const selectedUserInfos = useSelector(
state => state.navInfo.selectedUserList ?? [],
);
- const otherUserInfos = useSelector(userInfoSelectorForPotentialMembers);
return {
isChatCreation,
selectedUserInfos,
- otherUserInfos,
};
}