Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32162127
D15267.1765044626.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
9 KB
Referenced Files
None
Subscribers
None
D15267.1765044626.diff
View Options
diff --git a/lib/handlers/dm-activity-handler.js b/lib/handlers/non-keyserver-activity-handler.js
rename from lib/handlers/dm-activity-handler.js
rename to lib/handlers/non-keyserver-activity-handler.js
--- a/lib/handlers/dm-activity-handler.js
+++ b/lib/handlers/non-keyserver-activity-handler.js
@@ -13,7 +13,7 @@
const ACTIVITY_UPDATE_DURATION = 5000;
-function useDMActivityHandler(activeThread: ?string): void {
+function useNonKeyserverActivityHandler(activeThread: ?string): void {
const activeThreadInfo = useSelector(state =>
activeThread ? state.threadStore.threadInfos[activeThread] : null,
);
@@ -79,7 +79,7 @@
!activeThread ||
!activeThreadInfo ||
!threadSpecs[activeThreadInfo.type].protocol()
- .threadActivityUpdatedByDMActivityHandler ||
+ .threadActivityUpdatedByActivityHandlerOnly ||
threadIsPending(activeThread)
) {
return;
@@ -110,4 +110,4 @@
]);
}
-export default useDMActivityHandler;
+export default useNonKeyserverActivityHandler;
diff --git a/lib/shared/threads/protocols/dm-thread-protocol.js b/lib/shared/threads/protocols/dm-thread-protocol.js
--- a/lib/shared/threads/protocols/dm-thread-protocol.js
+++ b/lib/shared/threads/protocols/dm-thread-protocol.js
@@ -917,7 +917,7 @@
arePendingThreadsDescendantsOfGenesis: false,
- threadActivityUpdatedByDMActivityHandler: true,
+ threadActivityUpdatedByActivityHandlerOnly: true,
membershipMessageNotifAction: messageNotifyTypes.SET_UNREAD,
diff --git a/lib/shared/threads/protocols/farcaster-thread-protocol.js b/lib/shared/threads/protocols/farcaster-thread-protocol.js
--- a/lib/shared/threads/protocols/farcaster-thread-protocol.js
+++ b/lib/shared/threads/protocols/farcaster-thread-protocol.js
@@ -394,7 +394,7 @@
canActionsTargetPendingMessages: false,
messagesStoredOnServer: false,
arePendingThreadsDescendantsOfGenesis: false,
- threadActivityUpdatedByDMActivityHandler: false,
+ threadActivityUpdatedByActivityHandlerOnly: false,
membershipMessageNotifAction: messageNotifyTypes.NONE,
shouldConvertIDs: false,
dataIsBackedUp: true,
diff --git a/lib/shared/threads/protocols/keyserver-thread-protocol.js b/lib/shared/threads/protocols/keyserver-thread-protocol.js
--- a/lib/shared/threads/protocols/keyserver-thread-protocol.js
+++ b/lib/shared/threads/protocols/keyserver-thread-protocol.js
@@ -673,7 +673,7 @@
arePendingThreadsDescendantsOfGenesis: true,
- threadActivityUpdatedByDMActivityHandler: false,
+ threadActivityUpdatedByActivityHandlerOnly: false,
membershipMessageNotifAction: messageNotifyTypes.NONE,
diff --git a/lib/shared/threads/thread-spec.js b/lib/shared/threads/thread-spec.js
--- a/lib/shared/threads/thread-spec.js
+++ b/lib/shared/threads/thread-spec.js
@@ -428,7 +428,7 @@
+arePendingThreadsDescendantsOfGenesis: boolean,
// This flag is temporary. It should be deleted as a part of
// https://linear.app/comm/issue/ENG-10729/consider-merging-activity-handlers
- +threadActivityUpdatedByDMActivityHandler: boolean,
+ +threadActivityUpdatedByActivityHandlerOnly: boolean,
+membershipMessageNotifAction: MessageNotifyType,
+shouldConvertIDs: boolean,
// This flag specifies that all data created or updated should be included
diff --git a/native/components/dm-activity-handler.react.js b/native/components/dm-activity-handler.react.js
deleted file mode 100644
--- a/native/components/dm-activity-handler.react.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// @flow
-
-import * as React from 'react';
-
-import useDMActivityHandler from 'lib/handlers/dm-activity-handler.js';
-
-import { useForegroundActiveThread } from '../navigation/nav-selectors.js';
-
-function DMActivityHandler(): React.Node {
- const activeThread = useForegroundActiveThread();
- useDMActivityHandler(activeThread);
- return null;
-}
-
-export default DMActivityHandler;
diff --git a/native/components/non-keyserver-activity-handler.react.js b/native/components/non-keyserver-activity-handler.react.js
new file mode 100644
--- /dev/null
+++ b/native/components/non-keyserver-activity-handler.react.js
@@ -0,0 +1,15 @@
+// @flow
+
+import * as React from 'react';
+
+import useNonKeyserverActivityHandler from 'lib/handlers/non-keyserver-activity-handler.js';
+
+import { useForegroundActiveThread } from '../navigation/nav-selectors.js';
+
+function NonKeyserverActivityHandler(): React.Node {
+ const activeThread = useForegroundActiveThread();
+ useNonKeyserverActivityHandler(activeThread);
+ return null;
+}
+
+export default NonKeyserverActivityHandler;
diff --git a/native/redux/redux-setup.js b/native/redux/redux-setup.js
--- a/native/redux/redux-setup.js
+++ b/native/redux/redux-setup.js
@@ -380,7 +380,7 @@
!activeThread ||
!state.threadStore.threadInfos[activeThread]?.currentUser.unread ||
threadSpecs[state.threadStore.threadInfos[activeThread].type].protocol()
- .threadActivityUpdatedByDMActivityHandler ||
+ .threadActivityUpdatedByActivityHandlerOnly ||
(NativeAppState.currentState !== 'active' &&
(appLastBecameInactive + 10000 >= Date.now() ||
backgroundActionTypes.has(action.type)))
diff --git a/native/root.react.js b/native/root.react.js
--- a/native/root.react.js
+++ b/native/root.react.js
@@ -68,8 +68,8 @@
import ColdStartTracker from './components/cold-start-tracker.react.js';
import ConnectFarcasterAlertHandler from './components/connect-farcaster-alert-handler.react.js';
import DisplayCommunityDirectoryPromptHandler from './components/display-community-directory-prompt.react.js';
-import DMActivityHandler from './components/dm-activity-handler.react.js';
import { FeatureFlagsProvider } from './components/feature-flags-provider.react.js';
+import NonKeyserverActivityHandler from './components/non-keyserver-activity-handler.react.js';
import { NUXTipsContextProvider } from './components/nux-tips-context.react.js';
import PersistedStateGate from './components/persisted-state-gate.js';
import ReportHandler from './components/report-handler.react.js';
@@ -417,7 +417,7 @@
detectUnsupervisedBackgroundRef
}
/>
- <DMActivityHandler />
+ <NonKeyserverActivityHandler />
<VersionSupportedChecker />
<PlatformDetailsSynchronizer />
<PrekeysHandler />
diff --git a/web/app.react.js b/web/app.react.js
--- a/web/app.react.js
+++ b/web/app.react.js
@@ -66,9 +66,9 @@
import { MemberListSidebarProvider } from './chat/member-list-sidebar/member-list-sidebar-provider.react.js';
import { AutoJoinCommunityHandler } from './components/auto-join-community-handler.react.js';
import CommunitiesRefresher from './components/communities-refresher.react.js';
-import DMActivityHandler from './components/dm-activity-handler.react.js';
import LogOutIfMissingCSATHandler from './components/log-out-if-missing-csat-handler.react.js';
import NavigationArrows from './components/navigation-arrows.react.js';
+import NonKeyserverActivityHandler from './components/non-keyserver-activity-handler.react.js';
import MinVersionHandler from './components/version-handler.react.js';
import { olmAPI } from './crypto/olm-api.js';
import { sqliteAPI } from './database/sqlite-api.js';
@@ -275,7 +275,7 @@
<FarcasterDataHandler />
<AutoJoinCommunityHandler />
<SyncCommunityStoreHandler />
- <DMActivityHandler />
+ <NonKeyserverActivityHandler />
<HoldersHandler />
{content}
</GlobalSearchIndexProvider>
diff --git a/web/components/dm-activity-handler.react.js b/web/components/non-keyserver-activity-handler.react.js
rename from web/components/dm-activity-handler.react.js
rename to web/components/non-keyserver-activity-handler.react.js
--- a/web/components/dm-activity-handler.react.js
+++ b/web/components/non-keyserver-activity-handler.react.js
@@ -2,15 +2,15 @@
import * as React from 'react';
-import useDMActivityHandler from 'lib/handlers/dm-activity-handler.js';
+import useNonKeyserverActivityHandler from 'lib/handlers/non-keyserver-activity-handler.js';
import { useSelector } from '../redux/redux-utils.js';
import { foregroundActiveThreadSelector } from '../selectors/nav-selectors.js';
-function DMActivityHandler(): React.Node {
+function NonKeyserverActivityHandler(): React.Node {
const activeThread = useSelector(foregroundActiveThreadSelector);
- useDMActivityHandler(activeThread);
+ useNonKeyserverActivityHandler(activeThread);
return null;
}
-export default DMActivityHandler;
+export default NonKeyserverActivityHandler;
diff --git a/web/redux/redux-setup.js b/web/redux/redux-setup.js
--- a/web/redux/redux-setup.js
+++ b/web/redux/redux-setup.js
@@ -476,7 +476,7 @@
!state.navInfo.pendingThread &&
state.threadStore.threadInfos[activeThread].currentUser.unread &&
!threadSpecs[state.threadStore.threadInfos[activeThread].type].protocol()
- .threadActivityUpdatedByDMActivityHandler
+ .threadActivityUpdatedByActivityHandlerOnly
) {
// Makes sure a currently focused thread is never unread
const activeThreadInfo = state.threadStore.threadInfos[activeThread];
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 6, 6:10 PM (19 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5840019
Default Alt Text
D15267.1765044626.diff (9 KB)
Attached To
Mode
D15267: [lib][web][native] rename `DMActivityHandler` to `NonKeyserverActivityHandler`
Attached
Detach File
Event Timeline
Log In to Comment