diff --git a/native/account/fullscreen-siwe-panel.react.js b/native/account/fullscreen-siwe-panel.react.js --- a/native/account/fullscreen-siwe-panel.react.js +++ b/native/account/fullscreen-siwe-panel.react.js @@ -2,10 +2,10 @@ import * as React from 'react'; import { ActivityIndicator, View } from 'react-native'; -import { useDispatch } from 'react-redux'; import { setDataLoadedActionType } from 'lib/actions/client-db-store-actions.js'; import type { SIWEResult } from 'lib/types/siwe-types.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import { useSIWEServerCall } from './siwe-hooks.js'; import SIWEPanel from './siwe-panel.react.js'; diff --git a/native/account/logged-out-modal.react.js b/native/account/logged-out-modal.react.js --- a/native/account/logged-out-modal.react.js +++ b/native/account/logged-out-modal.react.js @@ -16,7 +16,6 @@ } from 'react-native'; import Animated, { EasingNode } from 'react-native-reanimated'; import { SafeAreaView } from 'react-native-safe-area-context'; -import { useDispatch } from 'react-redux'; import { resetUserStateActionType } from 'lib/actions/user-actions.js'; import { @@ -28,6 +27,7 @@ import { logInActionSources } from 'lib/types/account-types.js'; import type { Dispatch } from 'lib/types/redux-types.js'; import { fetchNewCookieFromNativeCredentials } from 'lib/utils/action-utils.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import { ashoatKeyserverID } from 'lib/utils/validation-utils.js'; import { splashBackgroundURI } from './background-info.js'; 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 @@ -11,7 +11,6 @@ Linking, } from 'react-native'; import Animated from 'react-native-reanimated'; -import { useDispatch } from 'react-redux'; import { setDataLoadedActionType } from 'lib/actions/client-db-store-actions.js'; import { @@ -38,6 +37,7 @@ useDispatchActionPromise, type DispatchActionPromise, } from 'lib/utils/action-utils.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import { TextInput } from './modal-components.react.js'; import { setNativeCredentials } from './native-credentials.js'; diff --git a/native/account/registration/existing-ethereum-account.react.js b/native/account/registration/existing-ethereum-account.react.js --- a/native/account/registration/existing-ethereum-account.react.js +++ b/native/account/registration/existing-ethereum-account.react.js @@ -2,13 +2,13 @@ import * as React from 'react'; import { Text, View } from 'react-native'; -import { useDispatch } from 'react-redux'; import { setDataLoadedActionType } from 'lib/actions/client-db-store-actions.js'; import { siweAuthActionTypes } from 'lib/actions/siwe-actions.js'; import { useENSName } from 'lib/hooks/ens-cache.js'; import { createLoadingStatusSelector } from 'lib/selectors/loading-selectors.js'; import type { SIWEResult } from 'lib/types/siwe-types.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import RegistrationButtonContainer from './registration-button-container.react.js'; import RegistrationButton from './registration-button.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 @@ -1,7 +1,6 @@ // @flow import * as React from 'react'; -import { useDispatch } from 'react-redux'; import { setDataLoadedActionType } from 'lib/actions/client-db-store-actions.js'; import { registerActionTypes, register } from 'lib/actions/user-actions.js'; @@ -10,6 +9,7 @@ useServerCall, useDispatchActionPromise, } from 'lib/utils/action-utils.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import { setURLPrefix } from 'lib/utils/url-utils.js'; import type { diff --git a/native/apps/app-listing.react.js b/native/apps/app-listing.react.js --- a/native/apps/app-listing.react.js +++ b/native/apps/app-listing.react.js @@ -2,13 +2,13 @@ import * as React from 'react'; import { View, Text, TouchableOpacity } from 'react-native'; -import { useDispatch } from 'react-redux'; import { disableAppActionType, enableAppActionType, } from 'lib/reducers/enabled-apps-reducer.js'; import type { SupportedApps } from 'lib/types/enabled-apps.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import SWMansionIcon from '../components/swmansion-icon.react.js'; import { useColors, useStyles } from '../themes/colors.js'; diff --git a/native/apps/apps-directory.react.js b/native/apps/apps-directory.react.js --- a/native/apps/apps-directory.react.js +++ b/native/apps/apps-directory.react.js @@ -2,11 +2,11 @@ import * as React from 'react'; import { Text, FlatList, View } from 'react-native'; -import { useSelector } from 'react-redux'; import AppListing from './app-listing.react.js'; import type { NavigationRoute } from '../navigation/route-names.js'; import type { TabNavigationProp } from '../navigation/tab-navigator.react.js'; +import { useSelector } from '../redux/redux-utils.js'; import { useStyles } from '../themes/colors.js'; const APP_DIRECTORY_DATA = [ diff --git a/native/backup/backup-handler.js b/native/backup/backup-handler.js --- a/native/backup/backup-handler.js +++ b/native/backup/backup-handler.js @@ -2,7 +2,6 @@ import AsyncStorage from '@react-native-async-storage/async-storage'; import * as React from 'react'; -import { useSelector } from 'react-redux'; import { isLoggedIn } from 'lib/selectors/user-selectors.js'; import { accountHasPassword } from 'lib/shared/account-utils.js'; @@ -12,6 +11,7 @@ import { convertObjToBytes } from './conversion-utils.js'; import { useClientBackup } from './use-client-backup.js'; import { commUtilsModule } from '../native-modules.js'; +import { useSelector } from '../redux/redux-utils.js'; import Alert from '../utils/alert.js'; import { useStaffCanSee } from '../utils/staff-utils.js'; diff --git a/native/backup/use-client-backup.js b/native/backup/use-client-backup.js --- a/native/backup/use-client-backup.js +++ b/native/backup/use-client-backup.js @@ -2,7 +2,6 @@ import _isEqual from 'lodash/fp/isEqual.js'; import * as React from 'react'; -import { useSelector } from 'react-redux'; import { uintArrayToHexString } from 'lib/media/data-utils.js'; import { isLoggedIn } from 'lib/selectors/user-selectors.js'; @@ -16,6 +15,7 @@ encryptBackup, } from './encryption.js'; import { commCoreModule } from '../native-modules.js'; +import { useSelector } from '../redux/redux-utils.js'; import { generateKey } from '../utils/aes-crypto-module.js'; import { getContentSigningKey } from '../utils/crypto-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 @@ -14,7 +14,6 @@ LayoutAnimation, Keyboard, } from 'react-native'; -import { useDispatch } from 'react-redux'; import shallowequal from 'shallowequal'; import tinycolor from 'tinycolor2'; @@ -58,6 +57,7 @@ import { dateString } from 'lib/utils/date-utils.js'; import { useResolvedThreadInfo } from 'lib/utils/entity-helpers.js'; import { ServerError } from 'lib/utils/errors.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/calendar/thread-picker-modal.react.js b/native/calendar/thread-picker-modal.react.js --- a/native/calendar/thread-picker-modal.react.js +++ b/native/calendar/thread-picker-modal.react.js @@ -3,7 +3,6 @@ import invariant from 'invariant'; import * as React from 'react'; import { StyleSheet } from 'react-native'; -import { useDispatch } from 'react-redux'; import { createLocalEntry, @@ -11,6 +10,7 @@ } from 'lib/actions/entry-actions.js'; import { useGlobalThreadSearchIndex } from 'lib/selectors/nav-selectors.js'; import { onScreenEntryEditableThreadInfos } from 'lib/selectors/thread-selectors.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import Modal from '../components/modal.react.js'; import ThreadList from '../components/thread-list.react.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 @@ -20,7 +20,6 @@ FadeInDown, FadeOutDown, } from 'react-native-reanimated'; -import { useDispatch } from 'react-redux'; import { moveDraftActionType, @@ -89,6 +88,7 @@ type DispatchActionPromise, useDispatchActionPromise, } from 'lib/utils/action-utils.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import { ChatContext } from './chat-context.js'; import type { ChatNavigationProp } from './chat.react.js'; diff --git a/native/chat/message-store-pruner.react.js b/native/chat/message-store-pruner.react.js --- a/native/chat/message-store-pruner.react.js +++ b/native/chat/message-store-pruner.react.js @@ -1,10 +1,10 @@ // @flow import * as React from 'react'; -import { useDispatch } from 'react-redux'; import { messageStorePruneActionType } from 'lib/actions/message-actions.js'; import { useIsAppForegrounded } from 'lib/shared/lifecycle-utils.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import { NavContext } from '../navigation/navigation-context.js'; import { useSelector } from '../redux/redux-utils.js'; diff --git a/native/components/swipeable.js b/native/components/swipeable.js --- a/native/components/swipeable.js +++ b/native/components/swipeable.js @@ -4,9 +4,9 @@ import { Animated, View } from 'react-native'; // eslint-disable-next-line import/extensions import SwipeableComponent from 'react-native-gesture-handler/Swipeable'; -import { useSelector } from 'react-redux'; import Button from './button.react.js'; +import { useSelector } from '../redux/redux-utils.js'; import { useStyles } from '../themes/colors.js'; type Props = { diff --git a/native/data/sqlite-data-handler.js b/native/data/sqlite-data-handler.js --- a/native/data/sqlite-data-handler.js +++ b/native/data/sqlite-data-handler.js @@ -2,7 +2,6 @@ import invariant from 'invariant'; import * as React from 'react'; -import { useDispatch } from 'react-redux'; import { setClientDBStoreActionType } from 'lib/actions/client-db-store-actions.js'; import { MediaCacheContext } from 'lib/components/media-cache-provider.react.js'; @@ -21,6 +20,7 @@ } from 'lib/types/account-types.js'; import { fetchNewCookieFromNativeCredentials } from 'lib/utils/action-utils.js'; import { getMessageForException } from 'lib/utils/errors.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import { ashoatKeyserverID } from 'lib/utils/validation-utils.js'; import { filesystemMediaCache } from '../media/media-cache.js'; 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 @@ -4,7 +4,6 @@ import invariant from 'invariant'; import * as React from 'react'; import { Platform } from 'react-native'; -import { useDispatch } from 'react-redux'; import { createSelector } from 'reselect'; import { @@ -96,6 +95,7 @@ import { getConfig } from 'lib/utils/config.js'; import { getMessageForException, cloneError } from 'lib/utils/errors.js'; import { values } from 'lib/utils/objects.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import { generateReportID, useIsReportEnabled, diff --git a/native/lifecycle/lifecycle-handler.react.js b/native/lifecycle/lifecycle-handler.react.js --- a/native/lifecycle/lifecycle-handler.react.js +++ b/native/lifecycle/lifecycle-handler.react.js @@ -1,13 +1,14 @@ // @flow import * as React from 'react'; -import { useSelector, useDispatch } from 'react-redux'; import { updateLifecycleStateActionType } from 'lib/reducers/lifecycle-state-reducer.js'; import type { LifecycleState } from 'lib/types/lifecycle-state-types.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import { addLifecycleListener } from './lifecycle.js'; import { appBecameInactive } from '../redux/redux-setup.js'; +import { useSelector } from '../redux/redux-utils.js'; const LifecycleHandler: React.ComponentType<{}> = React.memo<{}>( function LifecycleHandler() { diff --git a/native/media/camera-modal.react.js b/native/media/camera-modal.react.js --- a/native/media/camera-modal.react.js +++ b/native/media/camera-modal.react.js @@ -26,12 +26,12 @@ EasingNode as ReanimatedEasing, } from 'react-native-reanimated'; import { SafeAreaView } from 'react-native-safe-area-context'; -import { useDispatch } from 'react-redux'; import { pathFromURI, filenameFromPathOrURI } from 'lib/media/file-utils.js'; import { useIsAppForegrounded } from 'lib/shared/lifecycle-utils.js'; import type { PhotoCapture } from 'lib/types/media-types.js'; import type { Dispatch } from 'lib/types/redux-types.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import SendMediaButton from './send-media-button.react.js'; import type { RegistrationNavigationProp } from '../account/registration/registration-navigator.react.js'; diff --git a/native/media/save-media.js b/native/media/save-media.js --- a/native/media/save-media.js +++ b/native/media/save-media.js @@ -5,7 +5,6 @@ import * as React from 'react'; import { Platform, PermissionsAndroid } from 'react-native'; import filesystem from 'react-native-fs'; -import { useDispatch } from 'react-redux'; import { queueReportsActionType } from 'lib/actions/report-actions.js'; import { readableFilename, pathFromURI } from 'lib/media/file-utils.js'; @@ -22,6 +21,7 @@ import { getConfig } from 'lib/utils/config.js'; import { getMessageForException } from 'lib/utils/errors.js'; import { promiseAll } from 'lib/utils/promises.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import { generateReportID, useIsReportEnabled, diff --git a/native/navigation/app-navigator.react.js b/native/navigation/app-navigator.react.js --- a/native/navigation/app-navigator.react.js +++ b/native/navigation/app-navigator.react.js @@ -2,7 +2,6 @@ import * as SplashScreen from 'expo-splash-screen'; import * as React from 'react'; -import { useSelector } from 'react-redux'; import { PersistGate } from 'redux-persist/es/integration/react.js'; import ActionResultModal from './action-result-modal.react.js'; @@ -44,6 +43,7 @@ import UserRelationshipTooltipModal from '../profile/user-relationship-tooltip-modal.react.js'; import PushHandler from '../push/push-handler.react.js'; import { getPersistor } from '../redux/persist.js'; +import { useSelector } from '../redux/redux-utils.js'; import { RootContext } from '../root-context.js'; import { useLoadCommFonts } from '../themes/fonts.js'; import { waitForInteractions } from '../utils/timers.js'; diff --git a/native/navigation/nav-from-redux-handler.react.js b/native/navigation/nav-from-redux-handler.react.js --- a/native/navigation/nav-from-redux-handler.react.js +++ b/native/navigation/nav-from-redux-handler.react.js @@ -1,10 +1,10 @@ // @flow import * as React from 'react'; -import { useSelector } from 'react-redux'; import { setNavStateActionType } from './action-types.js'; import { NavContext } from './navigation-context.js'; +import { useSelector } from '../redux/redux-utils.js'; const NavFromReduxHandler: React.ComponentType<{}> = React.memo<{}>( function NavFromReduxHandler() { diff --git a/native/navigation/orientation-handler.react.js b/native/navigation/orientation-handler.react.js --- a/native/navigation/orientation-handler.react.js +++ b/native/navigation/orientation-handler.react.js @@ -3,9 +3,9 @@ import * as React from 'react'; import type { Orientations } from 'react-native-orientation-locker'; import Orientation from 'react-native-orientation-locker'; -import { useDispatch } from 'react-redux'; import type { Dispatch } from 'lib/types/redux-types.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import { updateDeviceOrientationActionType } from '../redux/action-types.js'; import { useSelector } from '../redux/redux-utils.js'; diff --git a/native/navigation/tab-bar.react.js b/native/navigation/tab-bar.react.js --- a/native/navigation/tab-bar.react.js +++ b/native/navigation/tab-bar.react.js @@ -5,7 +5,8 @@ import { Platform, View, StyleSheet } from 'react-native'; import Animated, { EasingNode } from 'react-native-reanimated'; import { useSafeArea } from 'react-native-safe-area-context'; -import { useDispatch } from 'react-redux'; + +import { useDispatch } from 'lib/utils/redux-utils.js'; import { KeyboardContext } from '../keyboard/keyboard-state.js'; import { updateDimensionsActiveType } from '../redux/action-types.js'; diff --git a/native/navigation/thread-screen-tracker.react.js b/native/navigation/thread-screen-tracker.react.js --- a/native/navigation/thread-screen-tracker.react.js +++ b/native/navigation/thread-screen-tracker.react.js @@ -1,9 +1,9 @@ // @flow import * as React from 'react'; -import { useDispatch } from 'react-redux'; import { updateThreadLastNavigatedActionType } from 'lib/types/thread-activity-types.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import { useActiveMessageList } from './nav-selectors.js'; diff --git a/native/profile/add-keyserver.react.js b/native/profile/add-keyserver.react.js --- a/native/profile/add-keyserver.react.js +++ b/native/profile/add-keyserver.react.js @@ -3,11 +3,11 @@ import { useNavigation } from '@react-navigation/native'; import * as React from 'react'; import { View, Text } from 'react-native'; -import { useDispatch } from 'react-redux'; import { addKeyserverActionType } from 'lib/actions/keyserver-actions.js'; import type { KeyserverInfo } from 'lib/types/keyserver-types.js'; import { defaultConnectionInfo } from 'lib/types/socket-types.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import type { ProfileNavigationProp } from './profile.react.js'; import TextInput from '../components/text-input.react.js'; diff --git a/native/profile/backup-menu.react.js b/native/profile/backup-menu.react.js --- a/native/profile/backup-menu.react.js +++ b/native/profile/backup-menu.react.js @@ -3,10 +3,10 @@ import * as React from 'react'; import { Alert, Switch, Text, View } from 'react-native'; import { ScrollView } from 'react-native-gesture-handler'; -import { useDispatch } from 'react-redux'; import { getMessageForException } from 'lib/utils/errors.js'; import { entries } from 'lib/utils/objects.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import type { ProfileNavigationProp } from './profile.react.js'; import { useClientBackup } from '../backup/use-client-backup.js'; diff --git a/native/profile/custom-server-modal.react.js b/native/profile/custom-server-modal.react.js --- a/native/profile/custom-server-modal.react.js +++ b/native/profile/custom-server-modal.react.js @@ -3,10 +3,10 @@ import invariant from 'invariant'; import * as React from 'react'; import { Text } from 'react-native'; -import { useDispatch } from 'react-redux'; import { urlPrefixSelector } from 'lib/selectors/keyserver-selectors.js'; import type { Dispatch } from 'lib/types/redux-types.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import { setURLPrefix } from 'lib/utils/url-utils.js'; import { ashoatKeyserverID } from 'lib/utils/validation-utils.js'; diff --git a/native/profile/dev-tools.react.js b/native/profile/dev-tools.react.js --- a/native/profile/dev-tools.react.js +++ b/native/profile/dev-tools.react.js @@ -4,10 +4,10 @@ import * as React from 'react'; import { View, Text, Platform } from 'react-native'; import { ScrollView } from 'react-native-gesture-handler'; -import { useDispatch } from 'react-redux'; import { urlPrefixSelector } from 'lib/selectors/keyserver-selectors.js'; import type { Dispatch } from 'lib/types/redux-types.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import { setURLPrefix } from 'lib/utils/url-utils.js'; import { ashoatKeyserverID } from 'lib/utils/validation-utils.js'; diff --git a/native/profile/keyserver-selection-bottom-sheet.react.js b/native/profile/keyserver-selection-bottom-sheet.react.js --- a/native/profile/keyserver-selection-bottom-sheet.react.js +++ b/native/profile/keyserver-selection-bottom-sheet.react.js @@ -4,11 +4,11 @@ import * as React from 'react'; import { View, Text } from 'react-native'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; -import { useDispatch } from 'react-redux'; import { removeKeyserverActionType } from 'lib/actions/keyserver-actions.js'; import type { KeyserverInfo } from 'lib/types/keyserver-types.js'; import type { GlobalAccountUserInfo } from 'lib/types/user-types.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import { BottomSheetContext } from '../bottom-sheet/bottom-sheet-provider.react.js'; import BottomSheet from '../bottom-sheet/bottom-sheet.react.js'; diff --git a/native/profile/toggle-report.react.js b/native/profile/toggle-report.react.js --- a/native/profile/toggle-report.react.js +++ b/native/profile/toggle-report.react.js @@ -2,10 +2,10 @@ import * as React from 'react'; import { Switch } from 'react-native'; -import { useDispatch } from 'react-redux'; import { updateReportsEnabledActionType } from 'lib/reducers/report-store-reducer.js'; import { type SupportedReports } from 'lib/types/report-types.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import { useIsReportEnabled } from 'lib/utils/report-utils.js'; type Props = { 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 @@ -5,7 +5,6 @@ import * as React from 'react'; import { Platform, LogBox } from 'react-native'; import { Notification as InAppNotification } from 'react-native-in-app-message'; -import { useDispatch } from 'react-redux'; import type { DeviceTokens, @@ -46,6 +45,7 @@ recordNotifPermissionAlertActionType, shouldSkipPushPermissionAlert, } from 'lib/utils/push-alerts.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/redux/connectivity-updater.react.js b/native/redux/connectivity-updater.react.js --- a/native/redux/connectivity-updater.react.js +++ b/native/redux/connectivity-updater.react.js @@ -2,7 +2,8 @@ import NetInfo from '@react-native-community/netinfo'; import * as React from 'react'; -import { useDispatch } from 'react-redux'; + +import { useDispatch } from 'lib/utils/redux-utils.js'; import { updateConnectivityActiveType } from './action-types.js'; import { useSelector } from './redux-utils.js'; diff --git a/native/redux/dev-tools.react.js b/native/redux/dev-tools.react.js --- a/native/redux/dev-tools.react.js +++ b/native/redux/dev-tools.react.js @@ -1,9 +1,9 @@ // @flow import * as React from 'react'; -import { useDispatch } from 'react-redux'; import { actionLogger } from 'lib/utils/action-logger.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import { setReduxStateActionType } from './action-types.js'; import { useSelector } from './redux-utils.js'; diff --git a/native/redux/dimensions-updater.react.js b/native/redux/dimensions-updater.react.js --- a/native/redux/dimensions-updater.react.js +++ b/native/redux/dimensions-updater.react.js @@ -6,9 +6,9 @@ useSafeAreaFrame, useSafeAreaInsets, } from 'react-native-safe-area-context'; -import { useDispatch } from 'react-redux'; import type { Dimensions } from 'lib/types/media-types.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import { updateDimensionsActiveType } from './action-types.js'; import { useSelector } from './redux-utils.js'; diff --git a/native/selectors/app-state-selectors.js b/native/selectors/app-state-selectors.js --- a/native/selectors/app-state-selectors.js +++ b/native/selectors/app-state-selectors.js @@ -1,6 +1,6 @@ // @flow -import { useSelector } from 'react-redux'; +import { useSelector } from '../redux/redux-utils.js'; function usePersistedStateLoaded(): boolean { const rehydrateConcluded = useSelector(state => !!state._persist?.rehydrated); diff --git a/native/socket.react.js b/native/socket.react.js --- a/native/socket.react.js +++ b/native/socket.react.js @@ -2,7 +2,6 @@ import invariant from 'invariant'; import * as React from 'react'; -import { useDispatch } from 'react-redux'; import { useLogOut, logOutActionTypes } from 'lib/actions/user-actions.js'; import { preRequestUserStateForSingleKeyserverSelector } from 'lib/selectors/account-selectors.js'; @@ -21,6 +20,7 @@ useDispatchActionPromise, fetchNewCookieFromNativeCredentials, } from 'lib/utils/action-utils.js'; +import { useDispatch } from 'lib/utils/redux-utils.js'; import { ashoatKeyserverID } from 'lib/utils/validation-utils.js'; import { InputStateContext } from './input/input-state.js';