Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F33018475
D8495.1768382286.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D8495.1768382286.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D8495: [lib] Don't send activity updates for pending threads
Attached
Detach File
Event Timeline
Log In to Comment