Page MenuHomePhorge

D8495.1768382286.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D8495.1768382286.diff

diff --git a/lib/socket/activity-handler.react.js b/lib/socket/activity-handler.react.js
--- a/lib/socket/activity-handler.react.js
+++ b/lib/socket/activity-handler.react.js
@@ -8,6 +8,7 @@
updateActivity,
} from '../actions/activity-actions.js';
import { getMostRecentNonLocalMessageID } from '../shared/message-utils.js';
+import { threadIsPending } from '../shared/thread-utils.js';
import { queueActivityUpdatesActionType } from '../types/activity-types.js';
import {
useServerCall,
@@ -62,15 +63,19 @@
React.useEffect(() => {
const activityUpdates = [];
+ const isActiveThreadPending = threadIsPending(activeThread);
+
if (activeThread !== prevActiveThread) {
- if (prevActiveThread) {
+ const isPrevActiveThreadPending = threadIsPending(prevActiveThread);
+
+ if (prevActiveThread && !isPrevActiveThreadPending) {
activityUpdates.push({
focus: false,
threadID: prevActiveThread,
latestMessage: prevActiveThreadLatestMessage,
});
}
- if (activeThread) {
+ if (activeThread && !isActiveThreadPending) {
activityUpdates.push({
focus: true,
threadID: activeThread,
@@ -83,7 +88,8 @@
!frozen &&
connectionStatus !== 'connected' &&
prevConnectionStatus === 'connected' &&
- activeThread
+ activeThread &&
+ !isActiveThreadPending
) {
// When the server closes a socket it also deletes any activity rows
// associated with that socket's session. If that activity is still

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 14, 9:18 AM (3 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5931284
Default Alt Text
D8495.1768382286.diff (1 KB)

Event Timeline