Page MenuHomePhabricator

D4095.id12977.diff
No OneTemporary

D4095.id12977.diff

diff --git a/web/chat/chat-message-list.react.js b/web/chat/chat-message-list.react.js
--- a/web/chat/chat-message-list.react.js
+++ b/web/chat/chat-message-list.react.js
@@ -23,6 +23,7 @@
import {
useWatchThread,
useExistingThreadInfoFinder,
+ threadIsPending,
} from 'lib/shared/thread-utils';
import type { FetchMessageInfosPayload } from 'lib/types/message-types';
import { type ThreadInfo } from 'lib/types/thread-types';
@@ -426,7 +427,7 @@
return null;
}
- if (state.navInfo.pendingThread) {
+ if (threadIsPending(threadInfo?.id)) {
return true;
}
diff --git a/web/redux/nav-reducer.js b/web/redux/nav-reducer.js
--- a/web/redux/nav-reducer.js
+++ b/web/redux/nav-reducer.js
@@ -1,6 +1,7 @@
// @flow
import { locallyUniqueToRealizedThreadIDsSelector } from 'lib/selectors/thread-selectors';
+import { threadIsPending } from 'lib/shared/thread-utils';
import type { RawThreadInfo } from 'lib/types/thread-types';
import type { Action } from '../redux/redux-setup';
@@ -35,5 +36,10 @@
}
}
+ if (!threadIsPending(state.activeChatThreadID) && state.pendingThread) {
+ const { pendingThread, ...stateWithoutPendingThread } = state;
+ state = stateWithoutPendingThread;
+ }
+
return state;
}

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 6:40 PM (20 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2585782
Default Alt Text
D4095.id12977.diff (1 KB)

Event Timeline