Page MenuHomePhabricator

D10593.id35482.diff
No OneTemporary

D10593.id35482.diff

diff --git a/lib/components/base-edit-thread-avatar-provider.react.js b/lib/components/base-edit-thread-avatar-provider.react.js
--- a/lib/components/base-edit-thread-avatar-provider.react.js
+++ b/lib/components/base-edit-thread-avatar-provider.react.js
@@ -10,7 +10,7 @@
import type { UpdateUserAvatarRequest } from '../types/avatar-types.js';
import type { LoadingStatus } from '../types/loading-types.js';
import type { UpdateThreadRequest } from '../types/thread-types.js';
-import { useDispatchActionPromise } from '../utils/action-utils.js';
+import { useDispatchActionPromise } from '../utils/redux-promise-utils.js';
import { useSelector } from '../utils/redux-utils.js';
export type EditThreadAvatarContextType = {
diff --git a/lib/components/edit-user-avatar-provider.react.js b/lib/components/edit-user-avatar-provider.react.js
--- a/lib/components/edit-user-avatar-provider.react.js
+++ b/lib/components/edit-user-avatar-provider.react.js
@@ -11,10 +11,8 @@
import type { SetState } from '../types/hook-types.js';
import type { LoadingStatus } from '../types/loading-types.js';
import type { NativeMediaSelection } from '../types/media-types.js';
-import {
- useDispatchActionPromise,
- useServerCall,
-} from '../utils/action-utils.js';
+import { useServerCall } from '../utils/action-utils.js';
+import { useDispatchActionPromise } from '../utils/redux-promise-utils.js';
import { useSelector } from '../utils/redux-utils.js';
export type UserAvatarSelection =
diff --git a/lib/components/keyserver-connection-handler.js b/lib/components/keyserver-connection-handler.js
--- a/lib/components/keyserver-connection-handler.js
+++ b/lib/components/keyserver-connection-handler.js
@@ -5,7 +5,7 @@
import { logOutActionTypes, useLogOut } from '../actions/user-actions.js';
import { connectionSelector } from '../selectors/keyserver-selectors.js';
import type { BaseSocketProps } from '../socket/socket.react.js';
-import { useDispatchActionPromise } from '../utils/action-utils.js';
+import { useDispatchActionPromise } from '../utils/redux-promise-utils.js';
import { useSelector } from '../utils/redux-utils.js';
import { ashoatKeyserverID } from '../utils/validation-utils.js';
diff --git a/lib/hooks/child-threads.js b/lib/hooks/child-threads.js
--- a/lib/hooks/child-threads.js
+++ b/lib/hooks/child-threads.js
@@ -15,7 +15,7 @@
import { threadInChatList } from '../shared/thread-utils.js';
import threadWatcher from '../shared/thread-watcher.js';
import type { RawThreadInfo, ThreadInfo } from '../types/thread-types.js';
-import { useDispatchActionPromise } from '../utils/action-utils.js';
+import { useDispatchActionPromise } from '../utils/redux-promise-utils.js';
import { useSelector } from '../utils/redux-utils.js';
type ThreadFilter = {
diff --git a/lib/hooks/invite-links.js b/lib/hooks/invite-links.js
--- a/lib/hooks/invite-links.js
+++ b/lib/hooks/invite-links.js
@@ -11,7 +11,7 @@
import { createLoadingStatusSelector } from '../selectors/loading-selectors.js';
import type { SetState } from '../types/hook-types.js';
import type { InviteLink } from '../types/link-types.js';
-import { useDispatchActionPromise } from '../utils/action-utils.js';
+import { useDispatchActionPromise } from '../utils/redux-promise-utils.js';
import { useSelector } from '../utils/redux-utils.js';
const createOrUpdatePublicLinkStatusSelector = createLoadingStatusSelector(
diff --git a/lib/hooks/promote-sidebar.react.js b/lib/hooks/promote-sidebar.react.js
--- a/lib/hooks/promote-sidebar.react.js
+++ b/lib/hooks/promote-sidebar.react.js
@@ -16,7 +16,7 @@
import { threadPermissions } from '../types/thread-permission-types.js';
import { threadTypes } from '../types/thread-types-enum.js';
import type { ThreadInfo } from '../types/thread-types.js';
-import { useDispatchActionPromise } from '../utils/action-utils.js';
+import { useDispatchActionPromise } from '../utils/redux-promise-utils.js';
import { useSelector } from '../utils/redux-utils.js';
function canPromoteSidebar(
diff --git a/lib/hooks/relationship-prompt.js b/lib/hooks/relationship-prompt.js
--- a/lib/hooks/relationship-prompt.js
+++ b/lib/hooks/relationship-prompt.js
@@ -14,10 +14,8 @@
} from '../types/relationship-types.js';
import type { ThreadInfo } from '../types/thread-types.js';
import type { UserInfo } from '../types/user-types.js';
-import {
- useDispatchActionPromise,
- useServerCall,
-} from '../utils/action-utils.js';
+import { useServerCall } from '../utils/action-utils.js';
+import { useDispatchActionPromise } from '../utils/redux-promise-utils.js';
import { useSelector } from '../utils/redux-utils.js';
type RelationshipCallbacks = {
diff --git a/lib/hooks/toggle-unread-status.js b/lib/hooks/toggle-unread-status.js
--- a/lib/hooks/toggle-unread-status.js
+++ b/lib/hooks/toggle-unread-status.js
@@ -11,7 +11,7 @@
SetThreadUnreadStatusRequest,
} from '../types/activity-types.js';
import type { ThreadInfo } from '../types/thread-types.js';
-import { useDispatchActionPromise } from '../utils/action-utils.js';
+import { useDispatchActionPromise } from '../utils/redux-promise-utils.js';
function useToggleUnreadStatus(
threadInfo: ThreadInfo,
diff --git a/lib/shared/crypto-utils.js b/lib/shared/crypto-utils.js
--- a/lib/shared/crypto-utils.js
+++ b/lib/shared/crypto-utils.js
@@ -12,15 +12,13 @@
OLMPrekey,
} from '../types/crypto-types';
import type { OlmSessionInitializationInfo } from '../types/request-types';
-import {
- useServerCall,
- useDispatchActionPromise,
-} from '../utils/action-utils.js';
+import { useServerCall } from '../utils/action-utils.js';
import type {
CallServerEndpointOptions,
CallServerEndpoint,
} from '../utils/call-server-endpoint.js';
import { values, entries } from '../utils/objects.js';
+import { useDispatchActionPromise } from '../utils/redux-promise-utils.js';
export type InitialNotifMessageOptions = {
+callServerEndpoint?: ?CallServerEndpoint,
diff --git a/lib/shared/edit-messages-utils.js b/lib/shared/edit-messages-utils.js
--- a/lib/shared/edit-messages-utils.js
+++ b/lib/shared/edit-messages-utils.js
@@ -16,7 +16,7 @@
import { messageTypes } from '../types/message-types-enum.js';
import { threadPermissions } from '../types/thread-permission-types.js';
import { type ThreadInfo } from '../types/thread-types.js';
-import { useDispatchActionPromise } from '../utils/action-utils.js';
+import { useDispatchActionPromise } from '../utils/redux-promise-utils.js';
import { useSelector } from '../utils/redux-utils.js';
function useEditMessage(): (
diff --git a/lib/shared/keyserver-utils.js b/lib/shared/keyserver-utils.js
--- a/lib/shared/keyserver-utils.js
+++ b/lib/shared/keyserver-utils.js
@@ -7,7 +7,7 @@
getVersionActionTypes,
} from '../actions/device-actions.js';
import { urlsToIDsSelector } from '../selectors/keyserver-selectors.js';
-import { useDispatchActionPromise } from '../utils/action-utils.js';
+import { useDispatchActionPromise } from '../utils/redux-promise-utils.js';
import { useSelector } from '../utils/redux-utils.js';
function useIsKeyserverURLValid(keyserverURL?: string): () => Promise<boolean> {
diff --git a/lib/shared/messages/text-message-spec.js b/lib/shared/messages/text-message-spec.js
--- a/lib/shared/messages/text-message-spec.js
+++ b/lib/shared/messages/text-message-spec.js
@@ -29,8 +29,8 @@
import { threadTypes } from '../../types/thread-types-enum.js';
import type { ThreadInfo } from '../../types/thread-types.js';
import type { RelativeUserInfo } from '../../types/user-types.js';
-import { useDispatchActionPromise } from '../../utils/action-utils.js';
import { ET } from '../../utils/entity-text.js';
+import { useDispatchActionPromise } from '../../utils/redux-promise-utils.js';
import {
type ASTNode,
type SingleASTNode,
diff --git a/lib/shared/search-utils.js b/lib/shared/search-utils.js
--- a/lib/shared/search-utils.js
+++ b/lib/shared/search-utils.js
@@ -35,12 +35,10 @@
UserListItem,
GlobalAccountUserInfo,
} from '../types/user-types.js';
-import {
- useServerCall,
- useDispatchActionPromise,
-} from '../utils/action-utils.js';
+import { useServerCall } from '../utils/action-utils.js';
import { isValidENSName } from '../utils/ens-helpers.js';
import { values } from '../utils/objects.js';
+import { useDispatchActionPromise } from '../utils/redux-promise-utils.js';
import { useSelector } from '../utils/redux-utils.js';
const notFriendNotice = 'not friend';
diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js
--- a/lib/shared/thread-utils.js
+++ b/lib/shared/thread-utils.js
@@ -109,11 +109,7 @@
LoggedInUserInfo,
UserInfo,
} from '../types/user-types.js';
-import {
- useDispatchActionPromise,
- useServerCall,
-} from '../utils/action-utils.js';
-import type { DispatchActionPromise } from '../utils/action-utils.js';
+import { useServerCall } from '../utils/action-utils.js';
import type { GetENSNames } from '../utils/ens-helpers.js';
import {
ET,
@@ -122,6 +118,10 @@
type ThreadEntity,
type UserEntity,
} from '../utils/entity-text.js';
+import {
+ useDispatchActionPromise,
+ type DispatchActionPromise,
+} from '../utils/redux-promise-utils.js';
import { useSelector } from '../utils/redux-utils.js';
import { firstLine } from '../utils/string-utils.js';
import { trimText } from '../utils/text-utils.js';
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
@@ -15,7 +15,7 @@
type ActivityUpdate,
} from '../types/activity-types.js';
import type { ConnectionStatus } from '../types/socket-types.js';
-import { useDispatchActionPromise } from '../utils/action-utils.js';
+import { useDispatchActionPromise } from '../utils/redux-promise-utils.js';
import { useSelector, useDispatch } from '../utils/redux-utils.js';
import { ashoatKeyserverID } from '../utils/validation-utils.js';
diff --git a/lib/socket/calendar-query-handler.react.js b/lib/socket/calendar-query-handler.react.js
--- a/lib/socket/calendar-query-handler.react.js
+++ b/lib/socket/calendar-query-handler.react.js
@@ -21,7 +21,7 @@
import {
type DispatchActionPromise,
useDispatchActionPromise,
-} from '../utils/action-utils.js';
+} from '../utils/redux-promise-utils.js';
import { useSelector } from '../utils/redux-utils.js';
import { ashoatKeyserverID } from '../utils/validation-utils.js';
diff --git a/lib/socket/report-handler.react.js b/lib/socket/report-handler.react.js
--- a/lib/socket/report-handler.react.js
+++ b/lib/socket/report-handler.react.js
@@ -11,7 +11,7 @@
import {
type DispatchActionPromise,
useDispatchActionPromise,
-} from '../utils/action-utils.js';
+} from '../utils/redux-promise-utils.js';
import { useSelector } from '../utils/redux-utils.js';
import { sendReports } from '../utils/reports-service.js';
diff --git a/lib/socket/socket.react.js b/lib/socket/socket.react.js
--- a/lib/socket/socket.react.js
+++ b/lib/socket/socket.react.js
@@ -65,11 +65,11 @@
type PongServerSocketMessage,
} from '../types/socket-types.js';
import { actionLogger } from '../utils/action-logger.js';
-import type { DispatchActionPromise } from '../utils/action-utils.js';
import { resolveKeyserverSessionInvalidation } from '../utils/action-utils.js';
import { getConfig } from '../utils/config.js';
import { ServerError, SocketTimeout, SocketOffline } from '../utils/errors.js';
import { promiseAll } from '../utils/promises.js';
+import type { DispatchActionPromise } from '../utils/redux-promise-utils.js';
import sleep from '../utils/sleep.js';
import { ashoatKeyserverID } from '../utils/validation-utils.js';
diff --git a/lib/utils/action-utils.js b/lib/utils/action-utils.js
--- a/lib/utils/action-utils.js
+++ b/lib/utils/action-utils.js
@@ -12,6 +12,7 @@
} from './call-server-endpoint.js';
import { getConfig } from './config.js';
import { promiseAll } from './promises.js';
+import { wrapActionPromise } from './redux-promise-utils.js';
import { useSelector, useDispatch } from './redux-utils.js';
import { usingCommServicesAccessToken } from './services-utils.js';
import { ashoatKeyserverID } from './validation-utils.js';
@@ -28,117 +29,10 @@
} from '../types/account-types.js';
import type { PlatformDetails } from '../types/device-types.js';
import type { Endpoint, SocketAPIHandler } from '../types/endpoints.js';
-import type { LoadingOptions, LoadingInfo } from '../types/loading-types.js';
-import type {
- ActionPayload,
- Dispatch,
- PromisedAction,
- BaseAction,
-} from '../types/redux-types.js';
+import type { Dispatch } from '../types/redux-types.js';
import type { ClientSessionChange } from '../types/session-types.js';
import type { CurrentUserInfo } from '../types/user-types.js';
-let nextPromiseIndex = 0;
-
-function wrapActionPromise<
- STARTED_ACTION_TYPE: string,
- STARTED_PAYLOAD: ActionPayload,
- SUCCESS_ACTION_TYPE: string,
- SUCCESS_PAYLOAD: ActionPayload,
- FAILED_ACTION_TYPE: string,
->(
- actionTypes: ActionTypes<
- STARTED_ACTION_TYPE,
- SUCCESS_ACTION_TYPE,
- FAILED_ACTION_TYPE,
- >,
- promise: Promise<SUCCESS_PAYLOAD>,
- loadingOptions: ?LoadingOptions,
- startingPayload: ?STARTED_PAYLOAD,
-): PromisedAction {
- const loadingInfo: LoadingInfo = {
- fetchIndex: nextPromiseIndex++,
- trackMultipleRequests: !!loadingOptions?.trackMultipleRequests,
- customKeyName: loadingOptions?.customKeyName || null,
- };
- return async (dispatch: Dispatch): Promise<void> => {
- const startAction = startingPayload
- ? {
- type: (actionTypes.started: STARTED_ACTION_TYPE),
- loadingInfo,
- payload: (startingPayload: STARTED_PAYLOAD),
- }
- : {
- type: (actionTypes.started: STARTED_ACTION_TYPE),
- loadingInfo,
- };
- dispatch(startAction);
- try {
- const result = await promise;
- dispatch({
- type: (actionTypes.success: SUCCESS_ACTION_TYPE),
- payload: (result: SUCCESS_PAYLOAD),
- loadingInfo,
- });
- } catch (e) {
- console.log(e);
- dispatch({
- type: (actionTypes.failed: FAILED_ACTION_TYPE),
- error: true,
- payload: (e: Error),
- loadingInfo,
- });
- }
- };
-}
-
-export type DispatchActionPromise = <
- STARTED: BaseAction,
- SUCCESS: BaseAction,
- FAILED: BaseAction,
->(
- actionTypes: ActionTypes<
- $PropertyType<STARTED, 'type'>,
- $PropertyType<SUCCESS, 'type'>,
- $PropertyType<FAILED, 'type'>,
- >,
- promise: Promise<$PropertyType<SUCCESS, 'payload'>>,
- loadingOptions?: LoadingOptions,
- startingPayload?: $PropertyType<STARTED, 'payload'>,
-) => Promise<void>;
-
-function useDispatchActionPromise(): DispatchActionPromise {
- const dispatch = useDispatch();
- return React.useMemo(() => createDispatchActionPromise(dispatch), [dispatch]);
-}
-
-function createDispatchActionPromise(dispatch: Dispatch) {
- const dispatchActionPromise = function <
- STARTED: BaseAction,
- SUCCESS: BaseAction,
- FAILED: BaseAction,
- >(
- actionTypes: ActionTypes<
- $PropertyType<STARTED, 'type'>,
- $PropertyType<SUCCESS, 'type'>,
- $PropertyType<FAILED, 'type'>,
- >,
- promise: Promise<$PropertyType<SUCCESS, 'payload'>>,
- loadingOptions?: LoadingOptions,
- startingPayload?: $PropertyType<STARTED, 'payload'>,
- ): Promise<void> {
- return dispatch(
- wrapActionPromise(actionTypes, promise, loadingOptions, startingPayload),
- );
- };
- return dispatchActionPromise;
-}
-
-export type DispatchFunctions = {
- +dispatch: Dispatch,
- +dispatchActionPromise: DispatchActionPromise,
-};
-
let currentlyWaitingForNewCookie = false;
let serverEndpointCallsWaitingForNewCookie: ((
callServerEndpoint: ?CallServerEndpoint,
@@ -500,7 +394,6 @@
}
export {
- useDispatchActionPromise,
resolveKeyserverSessionInvalidation,
createBoundServerCallsSelector,
registerActiveSocket,
diff --git a/lib/utils/policy-acknowledge-utlis.js b/lib/utils/policy-acknowledge-utlis.js
--- a/lib/utils/policy-acknowledge-utlis.js
+++ b/lib/utils/policy-acknowledge-utlis.js
@@ -1,6 +1,6 @@
// @flow
-import type { DispatchActionPromise } from './action-utils.js';
+import type { DispatchActionPromise } from './redux-promise-utils.js';
import { policyAcknowledgmentActionTypes } from '../actions/user-actions.js';
import type { PolicyType } from '../facts/policies.js';
import type { PolicyAcknowledgmentRequest } from '../types/account-types.js';
diff --git a/lib/utils/redux-promise-utils.js b/lib/utils/redux-promise-utils.js
new file mode 100644
--- /dev/null
+++ b/lib/utils/redux-promise-utils.js
@@ -0,0 +1,111 @@
+// @flow
+
+import * as React from 'react';
+
+import { useDispatch } from './redux-utils.js';
+import type { ActionTypes } from '../keyserver-conn/keyserver-conn-types.js';
+import type { LoadingOptions, LoadingInfo } from '../types/loading-types.js';
+import type {
+ ActionPayload,
+ BaseAction,
+ Dispatch,
+ PromisedAction,
+} from '../types/redux-types.js';
+
+let nextPromiseIndex = 0;
+
+function wrapActionPromise<
+ STARTED_ACTION_TYPE: string,
+ STARTED_PAYLOAD: ActionPayload,
+ SUCCESS_ACTION_TYPE: string,
+ SUCCESS_PAYLOAD: ActionPayload,
+ FAILED_ACTION_TYPE: string,
+>(
+ actionTypes: ActionTypes<
+ STARTED_ACTION_TYPE,
+ SUCCESS_ACTION_TYPE,
+ FAILED_ACTION_TYPE,
+ >,
+ promise: Promise<SUCCESS_PAYLOAD>,
+ loadingOptions: ?LoadingOptions,
+ startingPayload: ?STARTED_PAYLOAD,
+): PromisedAction {
+ const loadingInfo: LoadingInfo = {
+ fetchIndex: nextPromiseIndex++,
+ trackMultipleRequests: !!loadingOptions?.trackMultipleRequests,
+ customKeyName: loadingOptions?.customKeyName || null,
+ };
+ return async (dispatch: Dispatch): Promise<void> => {
+ const startAction = startingPayload
+ ? {
+ type: (actionTypes.started: STARTED_ACTION_TYPE),
+ loadingInfo,
+ payload: (startingPayload: STARTED_PAYLOAD),
+ }
+ : {
+ type: (actionTypes.started: STARTED_ACTION_TYPE),
+ loadingInfo,
+ };
+ dispatch(startAction);
+ try {
+ const result = await promise;
+ dispatch({
+ type: (actionTypes.success: SUCCESS_ACTION_TYPE),
+ payload: (result: SUCCESS_PAYLOAD),
+ loadingInfo,
+ });
+ } catch (e) {
+ console.log(e);
+ dispatch({
+ type: (actionTypes.failed: FAILED_ACTION_TYPE),
+ error: true,
+ payload: (e: Error),
+ loadingInfo,
+ });
+ }
+ };
+}
+
+export type DispatchActionPromise = <
+ STARTED: BaseAction,
+ SUCCESS: BaseAction,
+ FAILED: BaseAction,
+>(
+ actionTypes: ActionTypes<
+ $PropertyType<STARTED, 'type'>,
+ $PropertyType<SUCCESS, 'type'>,
+ $PropertyType<FAILED, 'type'>,
+ >,
+ promise: Promise<$PropertyType<SUCCESS, 'payload'>>,
+ loadingOptions?: LoadingOptions,
+ startingPayload?: $PropertyType<STARTED, 'payload'>,
+) => Promise<void>;
+
+function useDispatchActionPromise(): DispatchActionPromise {
+ const dispatch = useDispatch();
+ return React.useMemo(() => createDispatchActionPromise(dispatch), [dispatch]);
+}
+
+function createDispatchActionPromise(dispatch: Dispatch) {
+ const dispatchActionPromise = function <
+ STARTED: BaseAction,
+ SUCCESS: BaseAction,
+ FAILED: BaseAction,
+ >(
+ actionTypes: ActionTypes<
+ $PropertyType<STARTED, 'type'>,
+ $PropertyType<SUCCESS, 'type'>,
+ $PropertyType<FAILED, 'type'>,
+ >,
+ promise: Promise<$PropertyType<SUCCESS, 'payload'>>,
+ loadingOptions?: LoadingOptions,
+ startingPayload?: $PropertyType<STARTED, 'payload'>,
+ ): Promise<void> {
+ return dispatch(
+ wrapActionPromise(actionTypes, promise, loadingOptions, startingPayload),
+ );
+ };
+ return dispatchActionPromise;
+}
+
+export { wrapActionPromise, useDispatchActionPromise };
diff --git a/native/account/log-in-panel.react.js b/native/account/log-in-panel.react.js
--- a/native/account/log-in-panel.react.js
+++ b/native/account/log-in-panel.react.js
@@ -30,7 +30,7 @@
import {
useDispatchActionPromise,
type DispatchActionPromise,
-} from 'lib/utils/action-utils.js';
+} from 'lib/utils/redux-promise-utils.js';
import { TextInput } from './modal-components.react.js';
import {
diff --git a/native/account/register-panel.react.js b/native/account/register-panel.react.js
--- a/native/account/register-panel.react.js
+++ b/native/account/register-panel.react.js
@@ -32,11 +32,11 @@
} from 'lib/types/account-types.js';
import type { LoadingStatus } from 'lib/types/loading-types.js';
import type { Dispatch } from 'lib/types/redux-types.js';
+import { useServerCall } from 'lib/utils/action-utils.js';
import {
- useServerCall,
useDispatchActionPromise,
type DispatchActionPromise,
-} from 'lib/utils/action-utils.js';
+} from 'lib/utils/redux-promise-utils.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
import { TextInput } from './modal-components.react.js';
diff --git a/native/account/registration/connect-ethereum.react.js b/native/account/registration/connect-ethereum.react.js
--- a/native/account/registration/connect-ethereum.react.js
+++ b/native/account/registration/connect-ethereum.react.js
@@ -10,10 +10,8 @@
} from 'lib/actions/user-actions.js';
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
import type { SIWEResult } from 'lib/types/siwe-types.js';
-import {
- useServerCall,
- useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
+import { useServerCall } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useGetEthereumAccountFromSIWEResult } from './ethereum-utils.js';
import RegistrationButtonContainer from './registration-button-container.react.js';
diff --git a/native/account/registration/registration-server-call.js b/native/account/registration/registration-server-call.js
--- a/native/account/registration/registration-server-call.js
+++ b/native/account/registration/registration-server-call.js
@@ -5,10 +5,8 @@
import { setDataLoadedActionType } from 'lib/actions/client-db-store-actions.js';
import { registerActionTypes, register } from 'lib/actions/user-actions.js';
import type { LogInStartingPayload } from 'lib/types/account-types.js';
-import {
- useServerCall,
- useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
+import { useServerCall } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
import { setURLPrefix } from 'lib/utils/url-utils.js';
diff --git a/native/account/registration/username-selection.react.js b/native/account/registration/username-selection.react.js
--- a/native/account/registration/username-selection.react.js
+++ b/native/account/registration/username-selection.react.js
@@ -10,10 +10,8 @@
} from 'lib/actions/user-actions.js';
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
import { validUsernameRegex } from 'lib/shared/account-utils.js';
-import {
- useServerCall,
- useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
+import { useServerCall } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import RegistrationButtonContainer from './registration-button-container.react.js';
import RegistrationButton from './registration-button.react.js';
diff --git a/native/account/siwe-hooks.js b/native/account/siwe-hooks.js
--- a/native/account/siwe-hooks.js
+++ b/native/account/siwe-hooks.js
@@ -8,11 +8,9 @@
LogInStartingPayload,
LogInExtraInfo,
} from 'lib/types/account-types.js';
-import {
- useServerCall,
- useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
+import { useServerCall } from 'lib/utils/action-utils.js';
import type { CallServerEndpointOptions } from 'lib/utils/call-server-endpoint.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useSelector } from '../redux/redux-utils.js';
import { nativeLogInExtraInfoSelector } from '../selectors/account-selectors.js';
diff --git a/native/account/siwe-panel.react.js b/native/account/siwe-panel.react.js
--- a/native/account/siwe-panel.react.js
+++ b/native/account/siwe-panel.react.js
@@ -14,9 +14,9 @@
import type { SIWEWebViewMessage, SIWEResult } from 'lib/types/siwe-types.js';
import {
useServerCall,
- useDispatchActionPromise,
type BindServerCallsParams,
} from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useKeyboardHeight } from '../keyboard/keyboard-hooks.js';
import { useSelector } from '../redux/redux-utils.js';
diff --git a/native/account/terms-and-privacy-modal.react.js b/native/account/terms-and-privacy-modal.react.js
--- a/native/account/terms-and-privacy-modal.react.js
+++ b/native/account/terms-and-privacy-modal.react.js
@@ -17,11 +17,9 @@
} from 'lib/actions/user-actions.js';
import { type PolicyType, policyTypes } from 'lib/facts/policies.js';
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
-import {
- useDispatchActionPromise,
- useServerCall,
-} from 'lib/utils/action-utils.js';
+import { useServerCall } from 'lib/utils/action-utils.js';
import { acknowledgePolicy } from 'lib/utils/policy-acknowledge-utlis.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import Button from '../components/button.react.js';
import Modal from '../components/modal.react.js';
diff --git a/native/calendar/calendar.react.js b/native/calendar/calendar.react.js
--- a/native/calendar/calendar.react.js
+++ b/native/calendar/calendar.react.js
@@ -37,15 +37,15 @@
import type { LoadingStatus } from 'lib/types/loading-types.js';
import type { ConnectionStatus } from 'lib/types/socket-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
-import {
- useDispatchActionPromise,
- type DispatchActionPromise,
-} from 'lib/utils/action-utils.js';
import {
dateString,
prettyDate,
dateFromString,
} from 'lib/utils/date-utils.js';
+import {
+ useDispatchActionPromise,
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import sleep from 'lib/utils/sleep.js';
import { ashoatKeyserverID } from 'lib/utils/validation-utils.js';
diff --git a/native/calendar/entry.react.js b/native/calendar/entry.react.js
--- a/native/calendar/entry.react.js
+++ b/native/calendar/entry.react.js
@@ -45,13 +45,13 @@
import type { Dispatch } from 'lib/types/redux-types.js';
import { threadPermissions } from 'lib/types/thread-permission-types.js';
import type { ResolvedThreadInfo, ThreadInfo } from 'lib/types/thread-types.js';
-import {
- useDispatchActionPromise,
- type DispatchActionPromise,
-} from 'lib/utils/action-utils.js';
import { dateString } from 'lib/utils/date-utils.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
import { ServerError } from 'lib/utils/errors.js';
+import {
+ useDispatchActionPromise,
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
import sleep from 'lib/utils/sleep.js';
import { ashoatKeyserverID } from 'lib/utils/validation-utils.js';
diff --git a/native/chat/chat-input-bar.react.js b/native/chat/chat-input-bar.react.js
--- a/native/chat/chat-input-bar.react.js
+++ b/native/chat/chat-input-bar.react.js
@@ -84,9 +84,9 @@
} from 'lib/types/thread-types.js';
import { type UserInfos } from 'lib/types/user-types.js';
import {
- type DispatchActionPromise,
useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
import { ChatContext } from './chat-context.js';
diff --git a/native/chat/compose-subchannel.react.js b/native/chat/compose-subchannel.react.js
--- a/native/chat/compose-subchannel.react.js
+++ b/native/chat/compose-subchannel.react.js
@@ -19,7 +19,7 @@
import { type ThreadType, threadTypes } from 'lib/types/thread-types-enum.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import { type AccountUserInfo } from 'lib/types/user-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import type { ChatNavigationProp } from './chat.react.js';
import { useNavigateToThread } from './message-list-types.js';
diff --git a/native/chat/message-list.react.js b/native/chat/message-list.react.js
--- a/native/chat/message-list.react.js
+++ b/native/chat/message-list.react.js
@@ -22,9 +22,9 @@
import { threadTypes } from 'lib/types/thread-types-enum.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import {
- type DispatchActionPromise,
useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import ChatList from './chat-list.react.js';
import type { ChatNavigationProp } from './chat.react.js';
diff --git a/native/chat/message-report-utils.js b/native/chat/message-report-utils.js
--- a/native/chat/message-report-utils.js
+++ b/native/chat/message-report-utils.js
@@ -6,7 +6,7 @@
useSendMessageReport,
sendMessageReportActionTypes,
} from 'lib/actions/message-report-actions.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { displayActionResultModal } from '../navigation/action-result-modal.js';
import type { TooltipRoute } from '../tooltip/tooltip.react.js';
diff --git a/native/chat/reaction-message-utils.js b/native/chat/reaction-message-utils.js
--- a/native/chat/reaction-message-utils.js
+++ b/native/chat/reaction-message-utils.js
@@ -10,8 +10,8 @@
import type { ReactionInfo } from 'lib/selectors/chat-selectors.js';
import { messageTypes } from 'lib/types/message-types-enum.js';
import type { RawReactionMessageInfo } from 'lib/types/messages/reaction.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
import { cloneError } from 'lib/utils/errors.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useSelector } from '../redux/redux-utils.js';
import type {
diff --git a/native/chat/settings/add-users-modal.react.js b/native/chat/settings/add-users-modal.react.js
--- a/native/chat/settings/add-users-modal.react.js
+++ b/native/chat/settings/add-users-modal.react.js
@@ -15,7 +15,7 @@
import { threadActualMembers } from 'lib/shared/thread-utils.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import { type AccountUserInfo } from 'lib/types/user-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import Button from '../../components/button.react.js';
import Modal from '../../components/modal.react.js';
diff --git a/native/chat/settings/color-selector-modal.react.js b/native/chat/settings/color-selector-modal.react.js
--- a/native/chat/settings/color-selector-modal.react.js
+++ b/native/chat/settings/color-selector-modal.react.js
@@ -13,8 +13,10 @@
type UpdateThreadRequest,
type ThreadInfo,
} from 'lib/types/thread-types.js';
-import type { DispatchActionPromise } from 'lib/utils/action-utils.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import {
+ useDispatchActionPromise,
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import ColorSelector from '../../components/color-selector.react.js';
import Modal from '../../components/modal.react.js';
diff --git a/native/chat/settings/delete-thread.react.js b/native/chat/settings/delete-thread.react.js
--- a/native/chat/settings/delete-thread.react.js
+++ b/native/chat/settings/delete-thread.react.js
@@ -30,11 +30,11 @@
ThreadInfo,
ResolvedThreadInfo,
} from 'lib/types/thread-types.js';
+import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
import {
useDispatchActionPromise,
type DispatchActionPromise,
-} from 'lib/utils/action-utils.js';
-import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
+} from 'lib/utils/redux-promise-utils.js';
import Button from '../../components/button.react.js';
import { clearThreadsActionType } from '../../navigation/action-types.js';
diff --git a/native/chat/settings/thread-settings-description.react.js b/native/chat/settings/thread-settings-description.react.js
--- a/native/chat/settings/thread-settings-description.react.js
+++ b/native/chat/settings/thread-settings-description.react.js
@@ -23,9 +23,9 @@
type ThreadInfo,
} from 'lib/types/thread-types.js';
import {
- type DispatchActionPromise,
useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import SaveSettingButton from './save-setting-button.react.js';
import {
diff --git a/native/chat/settings/thread-settings-edit-relationship.react.js b/native/chat/settings/thread-settings-edit-relationship.react.js
--- a/native/chat/settings/thread-settings-edit-relationship.react.js
+++ b/native/chat/settings/thread-settings-edit-relationship.react.js
@@ -19,10 +19,8 @@
type RelationshipButton,
} from 'lib/types/relationship-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
-import {
- useDispatchActionPromise,
- useServerCall,
-} from 'lib/utils/action-utils.js';
+import { useServerCall } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import Button from '../../components/button.react.js';
import { useSelector } from '../../redux/redux-utils.js';
diff --git a/native/chat/settings/thread-settings-home-notifs.react.js b/native/chat/settings/thread-settings-home-notifs.react.js
--- a/native/chat/settings/thread-settings-home-notifs.react.js
+++ b/native/chat/settings/thread-settings-home-notifs.react.js
@@ -12,8 +12,10 @@
SubscriptionUpdateResult,
} from 'lib/types/subscription-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
-import type { DispatchActionPromise } from 'lib/utils/action-utils.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import {
+ useDispatchActionPromise,
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import SingleLine from '../../components/single-line.react.js';
import { useStyles } from '../../themes/colors.js';
diff --git a/native/chat/settings/thread-settings-leave-thread.react.js b/native/chat/settings/thread-settings-leave-thread.react.js
--- a/native/chat/settings/thread-settings-leave-thread.react.js
+++ b/native/chat/settings/thread-settings-leave-thread.react.js
@@ -15,9 +15,9 @@
import type { LoadingStatus } from 'lib/types/loading-types.js';
import type { LeaveThreadPayload, ThreadInfo } from 'lib/types/thread-types.js';
import {
- type DispatchActionPromise,
useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import Button from '../../components/button.react.js';
import { clearThreadsActionType } from '../../navigation/action-types.js';
diff --git a/native/chat/settings/thread-settings-member-tooltip-modal.react.js b/native/chat/settings/thread-settings-member-tooltip-modal.react.js
--- a/native/chat/settings/thread-settings-member-tooltip-modal.react.js
+++ b/native/chat/settings/thread-settings-member-tooltip-modal.react.js
@@ -6,7 +6,7 @@
import { removeMemberFromThread } from 'lib/shared/thread-utils.js';
import { stringForUser } from 'lib/shared/user-utils.js';
import type { RelativeMemberInfo, ThreadInfo } from 'lib/types/thread-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import ThreadSettingsMemberTooltipButton from './thread-settings-member-tooltip-button.react.js';
import type { AppNavigationProp } from '../../navigation/app-navigator.react';
diff --git a/native/chat/settings/thread-settings-name.react.js b/native/chat/settings/thread-settings-name.react.js
--- a/native/chat/settings/thread-settings-name.react.js
+++ b/native/chat/settings/thread-settings-name.react.js
@@ -21,9 +21,9 @@
ResolvedThreadInfo,
} from 'lib/types/thread-types.js';
import {
- type DispatchActionPromise,
useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import { firstLine } from 'lib/utils/string-utils.js';
import { chatNameMaxLength } from 'lib/utils/validation-utils.js';
diff --git a/native/chat/settings/thread-settings-push-notifs.react.js b/native/chat/settings/thread-settings-push-notifs.react.js
--- a/native/chat/settings/thread-settings-push-notifs.react.js
+++ b/native/chat/settings/thread-settings-push-notifs.react.js
@@ -15,8 +15,10 @@
SubscriptionUpdateResult,
} from 'lib/types/subscription-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
-import type { DispatchActionPromise } from 'lib/utils/action-utils.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import {
+ useDispatchActionPromise,
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import SingleLine from '../../components/single-line.react.js';
import SWMansionIcon from '../../components/swmansion-icon.react.js';
diff --git a/native/chat/toggle-pin-modal.react.js b/native/chat/toggle-pin-modal.react.js
--- a/native/chat/toggle-pin-modal.react.js
+++ b/native/chat/toggle-pin-modal.react.js
@@ -10,7 +10,7 @@
} from 'lib/actions/message-actions.js';
import type { RawMessageInfo } from 'lib/types/message-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import MessageResult from './message-result.react.js';
import Button from '../components/button.react.js';
diff --git a/native/community-creation/community-configuration.react.js b/native/community-creation/community-configuration.react.js
--- a/native/community-creation/community-configuration.react.js
+++ b/native/community-creation/community-configuration.react.js
@@ -11,7 +11,7 @@
import type { LoadingStatus } from 'lib/types/loading-types.js';
import { threadTypes } from 'lib/types/thread-types-enum.js';
import type { NewThreadResult } from 'lib/types/thread-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import CommunityCreationKeyserverLabel from './community-creation-keyserver-label.react.js';
import type { CommunityCreationNavigationProp } from './community-creation-navigator.react.js';
diff --git a/native/community-creation/community-creation-members.react.js b/native/community-creation/community-creation-members.react.js
--- a/native/community-creation/community-creation-members.react.js
+++ b/native/community-creation/community-creation-members.react.js
@@ -14,7 +14,7 @@
import type { LoadingStatus } from 'lib/types/loading-types.js';
import { threadTypes } from 'lib/types/thread-types-enum.js';
import type { AccountUserInfo } from 'lib/types/user-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import CommunityCreationContentContainer from './community-creation-content-container.react.js';
import CommunityCreationKeyserverLabel from './community-creation-keyserver-label.react.js';
diff --git a/native/components/version-supported.react.js b/native/components/version-supported.react.js
--- a/native/components/version-supported.react.js
+++ b/native/components/version-supported.react.js
@@ -4,7 +4,7 @@
import { useLogOut, logOutActionTypes } from 'lib/actions/user-actions.js';
import { isLoggedIn } from 'lib/selectors/user-selectors.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { commRustModule } from '../native-modules.js';
import { useSelector } from '../redux/redux-utils.js';
diff --git a/native/crash.react.js b/native/crash.react.js
--- a/native/crash.react.js
+++ b/native/crash.react.js
@@ -25,9 +25,9 @@
import type { PreRequestUserState } from 'lib/types/session-types.js';
import { actionLogger } from 'lib/utils/action-logger.js';
import {
- type DispatchActionPromise,
useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import {
generateReportID,
useIsReportEnabled,
diff --git a/native/input/input-state-container.react.js b/native/input/input-state-container.react.js
--- a/native/input/input-state-container.react.js
+++ b/native/input/input-state-container.react.js
@@ -83,11 +83,7 @@
type NewThreadResult,
type ThreadInfo,
} from 'lib/types/thread-types.js';
-import {
- type DispatchActionPromise,
- useServerCall,
- useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
+import { useServerCall } from 'lib/utils/action-utils.js';
import type {
CallServerEndpointOptions,
CallServerEndpointResponse,
@@ -95,6 +91,10 @@
import { getConfig } from 'lib/utils/config.js';
import { getMessageForException, cloneError } from 'lib/utils/errors.js';
import { values } from 'lib/utils/objects.js';
+import {
+ useDispatchActionPromise,
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
import {
generateReportID,
diff --git a/native/navigation/community-drawer-content.react.js b/native/navigation/community-drawer-content.react.js
--- a/native/navigation/community-drawer-content.react.js
+++ b/native/navigation/community-drawer-content.react.js
@@ -16,12 +16,12 @@
communityThreadSelector,
} from 'lib/selectors/thread-selectors.js';
import { threadTypeIsCommunityRoot } from 'lib/types/thread-types-enum.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
import {
createRecursiveDrawerItemsData,
useAppendCommunitySuffix,
} from 'lib/utils/drawer-utils.react.js';
import { useResolvedThreadInfos } from 'lib/utils/entity-helpers.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import CommunityDrawerItem from './community-drawer-item.react.js';
import { CommunityCreationRouteName } from './route-names.js';
diff --git a/native/navigation/deep-links-context-provider.react.js b/native/navigation/deep-links-context-provider.react.js
--- a/native/navigation/deep-links-context-provider.react.js
+++ b/native/navigation/deep-links-context-provider.react.js
@@ -16,10 +16,8 @@
} from 'lib/facts/links.js';
import { isLoggedIn } from 'lib/selectors/user-selectors.js';
import type { SetState } from 'lib/types/hook-types.js';
-import {
- useDispatchActionPromise,
- useServerCall,
-} from 'lib/utils/action-utils.js';
+import { useServerCall } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import {
InviteLinkModalRouteName,
diff --git a/native/navigation/invite-link-modal.react.js b/native/navigation/invite-link-modal.react.js
--- a/native/navigation/invite-link-modal.react.js
+++ b/native/navigation/invite-link-modal.react.js
@@ -10,7 +10,7 @@
} from 'lib/actions/thread-actions.js';
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
import type { InviteLinkVerificationResponse } from 'lib/types/link-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { nonThreadCalendarQuery } from './nav-selectors.js';
import { NavContext } from './navigation-context.js';
diff --git a/native/profile/default-notifications-preferences.react.js b/native/profile/default-notifications-preferences.react.js
--- a/native/profile/default-notifications-preferences.react.js
+++ b/native/profile/default-notifications-preferences.react.js
@@ -17,9 +17,9 @@
userSettingsTypes,
} from 'lib/types/account-types.js';
import {
- type DispatchActionPromise,
useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import type { ProfileNavigationProp } from './profile.react.js';
import Action from '../components/action-row.react.js';
diff --git a/native/profile/delete-account.react.js b/native/profile/delete-account.react.js
--- a/native/profile/delete-account.react.js
+++ b/native/profile/delete-account.react.js
@@ -15,7 +15,7 @@
createLoadingStatusSelector,
combineLoadingStatuses,
} from 'lib/selectors/loading-selectors.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { usingCommServicesAccessToken } from 'lib/utils/services-utils.js';
import type { ProfileNavigationProp } from './profile.react.js';
diff --git a/native/profile/edit-password.react.js b/native/profile/edit-password.react.js
--- a/native/profile/edit-password.react.js
+++ b/native/profile/edit-password.react.js
@@ -18,11 +18,11 @@
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
import type { LoadingStatus } from 'lib/types/loading-types.js';
import type { PasswordUpdate } from 'lib/types/user-types.js';
+import { useServerCall } from 'lib/utils/action-utils.js';
import {
- useServerCall,
useDispatchActionPromise,
type DispatchActionPromise,
-} from 'lib/utils/action-utils.js';
+} from 'lib/utils/redux-promise-utils.js';
import type { ProfileNavigationProp } from './profile.react.js';
import { setNativeCredentials } from '../account/native-credentials.js';
diff --git a/native/profile/profile-screen.react.js b/native/profile/profile-screen.react.js
--- a/native/profile/profile-screen.react.js
+++ b/native/profile/profile-screen.react.js
@@ -10,9 +10,9 @@
import type { LogOutResult } from 'lib/types/account-types.js';
import { type CurrentUserInfo } from 'lib/types/user-types.js';
import {
- type DispatchActionPromise,
useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import type { ProfileNavigationProp } from './profile.react.js';
import { deleteNativeCredentialsFor } from '../account/native-credentials.js';
diff --git a/native/profile/relationship-list-item.react.js b/native/profile/relationship-list-item.react.js
--- a/native/profile/relationship-list-item.react.js
+++ b/native/profile/relationship-list-item.react.js
@@ -22,11 +22,11 @@
AccountUserInfo,
GlobalAccountUserInfo,
} from 'lib/types/user-types.js';
+import { useServerCall } from 'lib/utils/action-utils.js';
import {
- type DispatchActionPromise,
- useServerCall,
useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import type { RelationshipListNavigate } from './relationship-list.react.js';
import UserAvatar from '../avatars/user-avatar.react.js';
diff --git a/native/profile/relationship-list.react.js b/native/profile/relationship-list.react.js
--- a/native/profile/relationship-list.react.js
+++ b/native/profile/relationship-list.react.js
@@ -22,11 +22,9 @@
GlobalAccountUserInfo,
AccountUserInfo,
} from 'lib/types/user-types.js';
-import {
- useServerCall,
- useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
+import { useServerCall } from 'lib/utils/action-utils.js';
import { values } from 'lib/utils/objects.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import type { ProfileNavigationProp } from './profile.react.js';
import RelationshipListItem from './relationship-list-item.react.js';
diff --git a/native/profile/user-relationship-tooltip-modal.react.js b/native/profile/user-relationship-tooltip-modal.react.js
--- a/native/profile/user-relationship-tooltip-modal.react.js
+++ b/native/profile/user-relationship-tooltip-modal.react.js
@@ -9,10 +9,8 @@
} from 'lib/actions/relationship-actions.js';
import { stringForUser } from 'lib/shared/user-utils.js';
import type { RelativeUserInfo } from 'lib/types/user-types.js';
-import {
- useDispatchActionPromise,
- useServerCall,
-} from 'lib/utils/action-utils.js';
+import { useServerCall } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import PencilIcon from '../components/pencil-icon.react.js';
import SWMansionIcon from '../components/swmansion-icon.react.js';
diff --git a/native/push/push-handler.react.js b/native/push/push-handler.react.js
--- a/native/push/push-handler.react.js
+++ b/native/push/push-handler.react.js
@@ -32,10 +32,6 @@
import { type ConnectionInfo } from 'lib/types/socket-types.js';
import type { GlobalTheme } from 'lib/types/theme-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
-import {
- useDispatchActionPromise,
- type DispatchActionPromise,
-} from 'lib/utils/action-utils.js';
import {
convertNotificationMessageInfoToNewIDSchema,
convertNonPendingIDToNewSchema,
@@ -45,6 +41,10 @@
recordNotifPermissionAlertActionType,
shouldSkipPushPermissionAlert,
} from 'lib/utils/push-alerts.js';
+import {
+ useDispatchActionPromise,
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
import sleep from 'lib/utils/sleep.js';
import { ashoatKeyserverID } from 'lib/utils/validation-utils.js';
diff --git a/native/roles/change-roles-header-right-button.react.js b/native/roles/change-roles-header-right-button.react.js
--- a/native/roles/change-roles-header-right-button.react.js
+++ b/native/roles/change-roles-header-right-button.react.js
@@ -10,7 +10,7 @@
useChangeThreadMemberRoles,
changeThreadMemberRolesActionTypes,
} from 'lib/actions/thread-actions.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import type { NavigationRoute } from '../navigation/route-names';
import { useColors } from '../themes/colors.js';
diff --git a/native/roles/create-roles-header-right-button.react.js b/native/roles/create-roles-header-right-button.react.js
--- a/native/roles/create-roles-header-right-button.react.js
+++ b/native/roles/create-roles-header-right-button.react.js
@@ -9,8 +9,8 @@
useModifyCommunityRole,
modifyCommunityRoleActionTypes,
} from 'lib/actions/thread-actions.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
import { values } from 'lib/utils/objects.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import type { NavigationRoute } from '../navigation/route-names';
import { useStyles } from '../themes/colors.js';
diff --git a/native/roles/role-utils.react.js b/native/roles/role-utils.react.js
--- a/native/roles/role-utils.react.js
+++ b/native/roles/role-utils.react.js
@@ -7,7 +7,7 @@
deleteCommunityRoleActionTypes,
} from 'lib/actions/thread-actions.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { constructRoleDeletionMessagePrompt } from 'lib/utils/role-utils.js';
import Alert from '../utils/alert.js';
diff --git a/native/socket.react.js b/native/socket.react.js
--- a/native/socket.react.js
+++ b/native/socket.react.js
@@ -16,10 +16,8 @@
import Socket, { type BaseSocketProps } from 'lib/socket/socket.react.js';
import { logInActionSources } from 'lib/types/account-types.js';
import { setConnectionIssueActionType } from 'lib/types/socket-types.js';
-import {
- useDispatchActionPromise,
- resolveKeyserverSessionInvalidation,
-} from 'lib/utils/action-utils.js';
+import { resolveKeyserverSessionInvalidation } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
import { ashoatKeyserverID } from 'lib/utils/validation-utils.js';
diff --git a/web/account/siwe-login-form.react.js b/web/account/siwe-login-form.react.js
--- a/web/account/siwe-login-form.react.js
+++ b/web/account/siwe-login-form.react.js
@@ -23,11 +23,9 @@
LogInExtraInfo,
} from 'lib/types/account-types.js';
import type { OLMIdentityKeys } from 'lib/types/crypto-types.js';
-import {
- useDispatchActionPromise,
- useServerCall,
-} from 'lib/utils/action-utils.js';
+import { useServerCall } from 'lib/utils/action-utils.js';
import { ServerError } from 'lib/utils/errors.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
import {
createSIWEMessage,
diff --git a/web/account/traditional-login-form.react.js b/web/account/traditional-login-form.react.js
--- a/web/account/traditional-login-form.react.js
+++ b/web/account/traditional-login-form.react.js
@@ -16,7 +16,7 @@
LogInStartingPayload,
} from 'lib/types/account-types.js';
import { logInActionSources } from 'lib/types/account-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useGetSignedIdentityKeysBlob } from './account-hooks.js';
import HeaderSeparator from './header-separator.react.js';
diff --git a/web/calendar/calendar.react.js b/web/calendar/calendar.react.js
--- a/web/calendar/calendar.react.js
+++ b/web/calendar/calendar.react.js
@@ -18,16 +18,16 @@
type CalendarQueryUpdateResult,
type CalendarQueryUpdateStartingPayload,
} from 'lib/types/entry-types.js';
-import {
- type DispatchActionPromise,
- useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
import {
getDate,
dateString,
startDateForYearAndMonth,
endDateForYearAndMonth,
} from 'lib/utils/date-utils.js';
+import {
+ useDispatchActionPromise,
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import css from './calendar.css';
import Day from './day.react.js';
diff --git a/web/calendar/entry.react.js b/web/calendar/entry.react.js
--- a/web/calendar/entry.react.js
+++ b/web/calendar/entry.react.js
@@ -37,13 +37,13 @@
import type { Dispatch } from 'lib/types/redux-types.js';
import { threadPermissions } from 'lib/types/thread-permission-types.js';
import type { ResolvedThreadInfo } from 'lib/types/thread-types.js';
-import {
- type DispatchActionPromise,
- useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
import { dateString } from 'lib/utils/date-utils.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
import { ServerError } from 'lib/utils/errors.js';
+import {
+ useDispatchActionPromise,
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
import { ashoatKeyserverID } from 'lib/utils/validation-utils.js';
diff --git a/web/chat/chat-input-bar.react.js b/web/chat/chat-input-bar.react.js
--- a/web/chat/chat-input-bar.react.js
+++ b/web/chat/chat-input-bar.react.js
@@ -43,9 +43,9 @@
} from 'lib/types/thread-types.js';
import { type UserInfos } from 'lib/types/user-types.js';
import {
- type DispatchActionPromise,
useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import css from './chat-input-bar.css';
import TypeaheadTooltip from './typeahead-tooltip.react.js';
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
@@ -29,9 +29,9 @@
import { threadTypes } from 'lib/types/thread-types-enum.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
import {
- type DispatchActionPromise,
useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import { editBoxHeight, defaultMaxTextAreaHeight } from './chat-constants.js';
import css from './chat-message-list.css';
diff --git a/web/chat/reaction-message-utils.js b/web/chat/reaction-message-utils.js
--- a/web/chat/reaction-message-utils.js
+++ b/web/chat/reaction-message-utils.js
@@ -11,9 +11,9 @@
import type { ReactionInfo } from 'lib/selectors/chat-selectors';
import { messageTypes } from 'lib/types/message-types-enum.js';
import type { RawReactionMessageInfo } from 'lib/types/messages/reaction.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
import type { CallServerEndpointResultInfoInterface } from 'lib/utils/call-server-endpoint.js';
import { cloneError } from 'lib/utils/errors.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import Alert from '../modals/alert.react.js';
import { useSelector } from '../redux/redux-utils.js';
diff --git a/web/chat/thread-menu.react.js b/web/chat/thread-menu.react.js
--- a/web/chat/thread-menu.react.js
+++ b/web/chat/thread-menu.react.js
@@ -18,7 +18,7 @@
import { threadPermissions } from 'lib/types/thread-permission-types.js';
import { threadTypes } from 'lib/types/thread-types-enum.js';
import { type ThreadInfo } from 'lib/types/thread-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import css from './thread-menu.css';
import MenuItem from '../components/menu-item.react.js';
diff --git a/web/input/input-state-container.react.js b/web/input/input-state-container.react.js
--- a/web/input/input-state-container.react.js
+++ b/web/input/input-state-container.react.js
@@ -81,11 +81,7 @@
type NewThreadResult,
type ThreadInfo,
} from 'lib/types/thread-types.js';
-import {
- type DispatchActionPromise,
- useServerCall,
- useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
+import { useServerCall } from 'lib/utils/action-utils.js';
import {
makeBlobServiceEndpointURL,
isBlobServiceURI,
@@ -93,6 +89,10 @@
} from 'lib/utils/blob-service.js';
import { getConfig } from 'lib/utils/config.js';
import { getMessageForException, cloneError } from 'lib/utils/errors.js';
+import {
+ useDispatchActionPromise,
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
import { generateReportID } from 'lib/utils/report-utils.js';
diff --git a/web/invite-links/accept-invite-modal.react.js b/web/invite-links/accept-invite-modal.react.js
--- a/web/invite-links/accept-invite-modal.react.js
+++ b/web/invite-links/accept-invite-modal.react.js
@@ -11,7 +11,7 @@
import { useModalContext } from 'lib/components/modal-provider.react.js';
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
import { type InviteLinkVerificationResponse } from 'lib/types/link-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import css from './accept-invite-modal.css';
import Button, { buttonThemes } from '../components/button.react.js';
diff --git a/web/invite-links/invite-link-handler.react.js b/web/invite-links/invite-link-handler.react.js
--- a/web/invite-links/invite-link-handler.react.js
+++ b/web/invite-links/invite-link-handler.react.js
@@ -8,10 +8,8 @@
} from 'lib/actions/link-actions.js';
import { useModalContext } from 'lib/components/modal-provider.react.js';
import { isLoggedIn } from 'lib/selectors/user-selectors.js';
-import {
- useDispatchActionPromise,
- useServerCall,
-} from 'lib/utils/action-utils.js';
+import { useServerCall } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
import AcceptInviteModal from './accept-invite-modal.react.js';
diff --git a/web/invite-links/invite-links-refresher.react.js b/web/invite-links/invite-links-refresher.react.js
--- a/web/invite-links/invite-links-refresher.react.js
+++ b/web/invite-links/invite-links-refresher.react.js
@@ -7,7 +7,7 @@
useFetchPrimaryInviteLinks,
} from 'lib/actions/link-actions.js';
import { isLoggedIn } from 'lib/selectors/user-selectors.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useSelector } from '../redux/redux-utils.js';
diff --git a/web/modals/chat/pinned-messages-modal.react.js b/web/modals/chat/pinned-messages-modal.react.js
--- a/web/modals/chat/pinned-messages-modal.react.js
+++ b/web/modals/chat/pinned-messages-modal.react.js
@@ -19,8 +19,8 @@
} from 'lib/shared/message-utils.js';
import type { RawMessageInfo } from 'lib/types/message-types.js';
import { type ThreadInfo } from 'lib/types/thread-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
import { pinnedMessageCountText } from 'lib/utils/message-pinning-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import css from './pinned-messages-modal.css';
import MessageResult from '../../components/message-result.react.js';
diff --git a/web/modals/chat/toggle-pin-modal.react.js b/web/modals/chat/toggle-pin-modal.react.js
--- a/web/modals/chat/toggle-pin-modal.react.js
+++ b/web/modals/chat/toggle-pin-modal.react.js
@@ -12,7 +12,7 @@
import { modifyItemForResultScreen } from 'lib/shared/message-utils.js';
import type { RawMessageInfo } from 'lib/types/message-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import css from './toggle-pin-modal.css';
import Button, { buttonThemes } from '../../components/button.react.js';
diff --git a/web/modals/history/history-entry.react.js b/web/modals/history/history-entry.react.js
--- a/web/modals/history/history-entry.react.js
+++ b/web/modals/history/history-entry.react.js
@@ -22,11 +22,11 @@
import type { LoadingStatus } from 'lib/types/loading-types.js';
import type { ResolvedThreadInfo } from 'lib/types/thread-types.js';
import type { UserInfo } from 'lib/types/user-types.js';
+import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
import {
- type DispatchActionPromise,
useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
-import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import css from './history.css';
import LoadingIndicator from '../../loading-indicator.react.js';
diff --git a/web/modals/history/history-modal.react.js b/web/modals/history/history-modal.react.js
--- a/web/modals/history/history-modal.react.js
+++ b/web/modals/history/history-modal.react.js
@@ -30,11 +30,11 @@
HistoryRevisionInfo,
} from 'lib/types/history-types.js';
import type { LoadingStatus } from 'lib/types/loading-types.js';
+import { prettyDateWithoutDay } from 'lib/utils/date-utils.js';
import {
- type DispatchActionPromise,
useDispatchActionPromise,
-} from 'lib/utils/action-utils.js';
-import { prettyDateWithoutDay } from 'lib/utils/date-utils.js';
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import HistoryEntry from './history-entry.react.js';
import HistoryRevision from './history-revision.react.js';
diff --git a/web/modals/terms-and-privacy-modal.react.js b/web/modals/terms-and-privacy-modal.react.js
--- a/web/modals/terms-and-privacy-modal.react.js
+++ b/web/modals/terms-and-privacy-modal.react.js
@@ -8,11 +8,9 @@
} from 'lib/actions/user-actions.js';
import { policyTypes } from 'lib/facts/policies.js';
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
-import {
- useDispatchActionPromise,
- useServerCall,
-} from 'lib/utils/action-utils.js';
+import { useServerCall } from 'lib/utils/action-utils.js';
import { acknowledgePolicy } from 'lib/utils/policy-acknowledge-utlis.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import Modal from './modal.react.js';
import css from './terms-and-privacy-modal.css';
diff --git a/web/modals/threads/create/compose-subchannel-modal.react.js b/web/modals/threads/create/compose-subchannel-modal.react.js
--- a/web/modals/threads/create/compose-subchannel-modal.react.js
+++ b/web/modals/threads/create/compose-subchannel-modal.react.js
@@ -9,8 +9,8 @@
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
import { threadTypes } from 'lib/types/thread-types-enum.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
import { trimText } from 'lib/utils/text-utils.js';
diff --git a/web/modals/threads/members/add-members-modal.react.js b/web/modals/threads/members/add-members-modal.react.js
--- a/web/modals/threads/members/add-members-modal.react.js
+++ b/web/modals/threads/members/add-members-modal.react.js
@@ -11,7 +11,7 @@
import { userInfoSelectorForPotentialMembers } from 'lib/selectors/user-selectors.js';
import { usePotentialMemberItems } from 'lib/shared/search-utils.js';
import { threadActualMembers } from 'lib/shared/thread-utils.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import AddMembersListContent from './add-members-list-content.react.js';
import css from './members-modal.css';
diff --git a/web/modals/threads/members/change-member-role-modal.react.js b/web/modals/threads/members/change-member-role-modal.react.js
--- a/web/modals/threads/members/change-member-role-modal.react.js
+++ b/web/modals/threads/members/change-member-role-modal.react.js
@@ -12,8 +12,8 @@
import { otherUsersButNoOtherAdmins } from 'lib/selectors/thread-selectors.js';
import { roleIsAdminRole } from 'lib/shared/thread-utils.js';
import type { RelativeMemberInfo, ThreadInfo } from 'lib/types/thread-types';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
import { values } from 'lib/utils/objects.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import css from './change-member-role-modal.css';
import UserAvatar from '../../../avatars/user-avatar.react.js';
diff --git a/web/modals/threads/members/member.react.js b/web/modals/threads/members/member.react.js
--- a/web/modals/threads/members/member.react.js
+++ b/web/modals/threads/members/member.react.js
@@ -12,7 +12,7 @@
import { stringForUser } from 'lib/shared/user-utils.js';
import type { SetState } from 'lib/types/hook-types.js';
import type { RelativeMemberInfo, ThreadInfo } from 'lib/types/thread-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useRolesFromCommunityThreadInfo } from 'lib/utils/role-utils.js';
import ChangeMemberRoleModal from './change-member-role-modal.react.js';
diff --git a/web/modals/threads/notifications/notifications-modal.react.js b/web/modals/threads/notifications/notifications-modal.react.js
--- a/web/modals/threads/notifications/notifications-modal.react.js
+++ b/web/modals/threads/notifications/notifications-modal.react.js
@@ -9,7 +9,7 @@
import { canPromoteSidebar } from 'lib/hooks/promote-sidebar.react.js';
import { threadInfoSelector } from 'lib/selectors/thread-selectors.js';
import { threadIsSidebar } from 'lib/shared/thread-utils.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import css from './notifications-modal.css';
import AllNotifsIllustration from '../../../assets/all-notifs.react.js';
diff --git a/web/modals/threads/settings/thread-settings-delete-tab.react.js b/web/modals/threads/settings/thread-settings-delete-tab.react.js
--- a/web/modals/threads/settings/thread-settings-delete-tab.react.js
+++ b/web/modals/threads/settings/thread-settings-delete-tab.react.js
@@ -11,7 +11,7 @@
import { containedThreadInfos } from 'lib/selectors/thread-selectors.js';
import { type SetState } from 'lib/types/hook-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import SubmitSection from './submit-section.react.js';
import ThreadDeleteConfirmationModal from './thread-settings-delete-confirmation-modal.react.js';
diff --git a/web/modals/threads/settings/thread-settings-general-tab.react.js b/web/modals/threads/settings/thread-settings-general-tab.react.js
--- a/web/modals/threads/settings/thread-settings-general-tab.react.js
+++ b/web/modals/threads/settings/thread-settings-general-tab.react.js
@@ -11,7 +11,7 @@
import { type SetState } from 'lib/types/hook-types.js';
import { threadPermissions } from 'lib/types/thread-permission-types.js';
import { type ThreadChanges, type ThreadInfo } from 'lib/types/thread-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { firstLine } from 'lib/utils/string-utils.js';
import { chatNameMaxLength } from 'lib/utils/validation-utils.js';
diff --git a/web/modals/threads/settings/thread-settings-privacy-tab.react.js b/web/modals/threads/settings/thread-settings-privacy-tab.react.js
--- a/web/modals/threads/settings/thread-settings-privacy-tab.react.js
+++ b/web/modals/threads/settings/thread-settings-privacy-tab.react.js
@@ -12,7 +12,7 @@
import { type SetState } from 'lib/types/hook-types.js';
import { threadTypes } from 'lib/types/thread-types-enum.js';
import { type ThreadChanges, type ThreadInfo } from 'lib/types/thread-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import SubmitSection from './submit-section.react.js';
import css from './thread-settings-privacy-tab.css';
diff --git a/web/modals/threads/settings/thread-settings-relationship-button.react.js b/web/modals/threads/settings/thread-settings-relationship-button.react.js
--- a/web/modals/threads/settings/thread-settings-relationship-button.react.js
+++ b/web/modals/threads/settings/thread-settings-relationship-button.react.js
@@ -24,10 +24,8 @@
type RelationshipButton,
} from 'lib/types/relationship-types.js';
import type { UserInfo } from 'lib/types/user-types.js';
-import {
- useDispatchActionPromise,
- useServerCall,
-} from 'lib/utils/action-utils.js';
+import { useServerCall } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import css from './thread-settings-relationship-tab.css';
import Button, { buttonThemes } from '../../../components/button.react.js';
diff --git a/web/push-notif/push-notifs-handler.js b/web/push-notif/push-notifs-handler.js
--- a/web/push-notif/push-notifs-handler.js
+++ b/web/push-notif/push-notifs-handler.js
@@ -8,12 +8,12 @@
} from 'lib/actions/device-actions.js';
import { useModalContext } from 'lib/components/modal-provider.react.js';
import { isLoggedIn } from 'lib/selectors/user-selectors.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
import { convertNonPendingIDToNewSchema } from 'lib/utils/migration-utils.js';
import {
shouldSkipPushPermissionAlert,
recordNotifPermissionAlertActionType,
} from 'lib/utils/push-alerts.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
import { ashoatKeyserverID } from 'lib/utils/validation-utils.js';
diff --git a/web/roles/create-roles-modal.react.js b/web/roles/create-roles-modal.react.js
--- a/web/roles/create-roles-modal.react.js
+++ b/web/roles/create-roles-modal.react.js
@@ -20,8 +20,8 @@
RoleModificationRequest,
ThreadInfo,
} from 'lib/types/thread-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
import { values } from 'lib/utils/objects.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import css from './create-roles-modal.css';
import Button, { buttonThemes } from '../components/button.react.js';
diff --git a/web/roles/delete-role-modal.react.js b/web/roles/delete-role-modal.react.js
--- a/web/roles/delete-role-modal.react.js
+++ b/web/roles/delete-role-modal.react.js
@@ -11,7 +11,7 @@
import { useRoleMemberCountsForCommunity } from 'lib/shared/thread-utils.js';
import type { LoadingStatus } from 'lib/types/loading-types.js';
import type { ThreadInfo } from 'lib/types/thread-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { constructRoleDeletionMessagePrompt } from 'lib/utils/role-utils.js';
import css from './delete-role-modal.css';
diff --git a/web/settings/account-delete-modal.react.js b/web/settings/account-delete-modal.react.js
--- a/web/settings/account-delete-modal.react.js
+++ b/web/settings/account-delete-modal.react.js
@@ -12,7 +12,7 @@
import SWMansionIcon from 'lib/components/SWMansionIcon.react.js';
import { preRequestUserStateSelector } from 'lib/selectors/account-selectors.js';
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { usingCommServicesAccessToken } from 'lib/utils/services-utils.js';
import css from './account-delete-modal.css';
diff --git a/web/settings/account-settings.react.js b/web/settings/account-settings.react.js
--- a/web/settings/account-settings.react.js
+++ b/web/settings/account-settings.react.js
@@ -8,7 +8,7 @@
import { useStringForUser } from 'lib/hooks/ens-cache.js';
import { accountHasPassword } from 'lib/shared/account-utils.js';
import { useTunnelbroker } from 'lib/tunnelbroker/tunnelbroker-context.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import css from './account-settings.css';
import AppearanceChangeModal from './appearance-change-modal.react.js';
diff --git a/web/settings/password-change-modal.js b/web/settings/password-change-modal.js
--- a/web/settings/password-change-modal.js
+++ b/web/settings/password-change-modal.js
@@ -11,11 +11,11 @@
import { useStringForUser } from 'lib/hooks/ens-cache.js';
import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js';
import { type PasswordUpdate } from 'lib/types/user-types.js';
+import { useServerCall } from 'lib/utils/action-utils.js';
import {
- type DispatchActionPromise,
useDispatchActionPromise,
- useServerCall,
-} from 'lib/utils/action-utils.js';
+ type DispatchActionPromise,
+} from 'lib/utils/redux-promise-utils.js';
import css from './password-change-modal.css';
import Button from '../components/button.react.js';
diff --git a/web/settings/relationship/add-users-list.react.js b/web/settings/relationship/add-users-list.react.js
--- a/web/settings/relationship/add-users-list.react.js
+++ b/web/settings/relationship/add-users-list.react.js
@@ -18,11 +18,9 @@
GlobalAccountUserInfo,
AccountUserInfo,
} from 'lib/types/user-types.js';
-import {
- useDispatchActionPromise,
- useServerCall,
-} from 'lib/utils/action-utils.js';
+import { useServerCall } from 'lib/utils/action-utils.js';
import { values } from 'lib/utils/objects.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import AddUsersListItem from './add-users-list-item.react.js';
import css from './add-users-list.css';
diff --git a/web/sidebar/community-creation/community-creation-modal.react.js b/web/sidebar/community-creation/community-creation-modal.react.js
--- a/web/sidebar/community-creation/community-creation-modal.react.js
+++ b/web/sidebar/community-creation/community-creation-modal.react.js
@@ -11,7 +11,7 @@
import type { LoadingStatus } from 'lib/types/loading-types.js';
import { threadTypes } from 'lib/types/thread-types-enum.js';
import type { NewThreadResult } from 'lib/types/thread-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
import CommunityCreationKeyserverLabel from './community-creation-keyserver-label.react.js';
diff --git a/web/socket.react.js b/web/socket.react.js
--- a/web/socket.react.js
+++ b/web/socket.react.js
@@ -14,7 +14,7 @@
import Socket, { type BaseSocketProps } from 'lib/socket/socket.react.js';
import type { OLMIdentityKeys } from 'lib/types/crypto-types.js';
import type { OlmSessionInitializationInfo } from 'lib/types/request-types.js';
-import { useDispatchActionPromise } from 'lib/utils/action-utils.js';
+import { useDispatchActionPromise } from 'lib/utils/redux-promise-utils.js';
import { useDispatch } from 'lib/utils/redux-utils.js';
import { ashoatKeyserverID } from 'lib/utils/validation-utils.js';

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 12:09 PM (20 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2575514
Default Alt Text
D10593.id35482.diff (77 KB)

Event Timeline