Page MenuHomePhorge

D4474.1765099270.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D4474.1765099270.diff

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
@@ -14,6 +14,7 @@
useWatchThread,
useExistingThreadInfoFinder,
createPendingThread,
+ threadIsPending,
} from 'lib/shared/thread-utils';
import { threadTypes } from 'lib/types/thread-types';
import type { AccountUserInfo } from 'lib/types/user-types';
@@ -113,6 +114,24 @@
userInfoInputArray,
]);
+ React.useEffect(() => {
+ if (isChatCreation && activeChatThreadID !== threadInfo?.id) {
+ let payload = {
+ activeChatThreadID: threadInfo?.id,
+ };
+ if (threadIsPending(threadInfo?.id)) {
+ payload = {
+ ...payload,
+ pendingThread: threadInfo,
+ };
+ }
+ dispatch({
+ type: updateNavInfoActionType,
+ payload,
+ });
+ }
+ }, [activeChatThreadID, dispatch, isChatCreation, threadInfo]);
+
const inputState = React.useContext(InputStateContext);
invariant(inputState, 'InputState should be set');
const [{ isActive }, connectDropTarget] = useDrop({

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 7, 9:21 AM (8 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5842822
Default Alt Text
D4474.1765099270.diff (1 KB)

Event Timeline