Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3367098
D4474.id14265.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D4474.id14265.diff
View Options
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';
@@ -110,6 +111,30 @@
userInfoInputArray,
]);
+ React.useEffect(() => {
+ if (isChatCreation && activeChatThreadID !== threadInfo?.id) {
+ let payload = {
+ activeChatThreadID: threadInfo?.id,
+ };
+ if (threadIsPending(activeChatThreadID)) {
+ payload = {
+ ...payload,
+ pendingThread: threadInfo,
+ };
+ }
+ dispatch({
+ type: updateNavInfoActionType,
+ payload,
+ });
+ }
+ }, [
+ activeChatThreadID,
+ dispatch,
+ isChatCreation,
+ threadInfo,
+ threadInfo?.id,
+ ]);
+
const inputState = React.useContext(InputStateContext);
const [{ isActive }, connectDropTarget] = useDrop({
accept: NativeTypes.FILE,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 1:45 PM (21 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2584940
Default Alt Text
D4474.id14265.diff (1 KB)
Attached To
Mode
D4474: [web] Keep `activeChatThreadID` and `pendingThread` updated in `navInfo` in thread creation mode
Attached
Detach File
Event Timeline
Log In to Comment