diff --git a/native/staff/staff-context.provider.react.js b/lib/components/staff-provider.react.js rename from native/staff/staff-context.provider.react.js rename to lib/components/staff-provider.react.js --- a/native/staff/staff-context.provider.react.js +++ b/lib/components/staff-provider.react.js @@ -2,7 +2,7 @@ import * as React from 'react'; -import { useIsCurrentUserStaff } from 'lib/shared/staff-utils.js'; +import { useIsCurrentUserStaff } from '../shared/staff-utils.js'; export type StaffContextType = { +staffUserHasBeenLoggedIn: boolean, diff --git a/native/account/logged-out-staff-info.react.js b/native/account/logged-out-staff-info.react.js --- a/native/account/logged-out-staff-info.react.js +++ b/native/account/logged-out-staff-info.react.js @@ -3,8 +3,9 @@ import * as React from 'react'; import { Text, View } from 'react-native'; +import { useStaffContext } from 'lib/components/staff-provider.react.js'; + import SWMansionIcon from '../components/swmansion-icon.react.js'; -import { useStaffContext } from '../staff/staff-context.provider.react.js'; import { useStyles, useColors } from '../themes/colors.js'; import { isStaffRelease, useStaffCanSee } from '../utils/staff-utils.js'; 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 @@ -5,6 +5,7 @@ import { setClientDBStoreActionType } from 'lib/actions/client-db-store-actions.js'; import { MediaCacheContext } from 'lib/components/media-cache-provider.react.js'; +import { useStaffContext } from 'lib/components/staff-provider.react.js'; import { resolveKeyserverSessionInvalidation } from 'lib/keyserver-conn/recovery-utils.js'; import { reportStoreOpsHandlers } from 'lib/ops/report-store-ops.js'; import { threadStoreOpsHandlers } from 'lib/ops/thread-store-ops.js'; @@ -27,7 +28,6 @@ import { commCoreModule } from '../native-modules.js'; import { setStoreLoadedActionType } from '../redux/action-types.js'; import { useSelector } from '../redux/redux-utils.js'; -import { useStaffContext } from '../staff/staff-context.provider.react.js'; import Alert from '../utils/alert.js'; import { nativeNotificationsSessionCreator } from '../utils/crypto-utils.js'; import { isTaskCancelledError } from '../utils/error-handling.js'; diff --git a/native/profile/build-info.react.js b/native/profile/build-info.react.js --- a/native/profile/build-info.react.js +++ b/native/profile/build-info.react.js @@ -4,12 +4,12 @@ import { View, Text } from 'react-native'; import { ScrollView } from 'react-native-gesture-handler'; +import { useStaffContext } from 'lib/components/staff-provider.react.js'; import { useIsCurrentUserStaff } from 'lib/shared/staff-utils.js'; import type { ProfileNavigationProp } from './profile.react.js'; import type { NavigationRoute } from '../navigation/route-names.js'; import { persistConfig, codeVersion } from '../redux/persist.js'; -import { useStaffContext } from '../staff/staff-context.provider.react.js'; import { useStyles } from '../themes/colors.js'; import { isStaffRelease, useStaffCanSee } from '../utils/staff-utils.js'; diff --git a/native/root.react.js b/native/root.react.js --- a/native/root.react.js +++ b/native/root.react.js @@ -29,6 +29,7 @@ import IntegrityHandler from 'lib/components/integrity-handler.react.js'; import KeyserverConnectionsHandler from 'lib/components/keyserver-connections-handler.js'; import { MediaCacheProvider } from 'lib/components/media-cache-provider.react.js'; +import { StaffContextProvider } from 'lib/components/staff-provider.react.js'; import { CallKeyserverEndpointProvider } from 'lib/keyserver-conn/call-keyserver-endpoint-provider.react.js'; import { TunnelbrokerProvider } from 'lib/tunnelbroker/tunnelbroker-context.js'; import { actionLogger } from 'lib/utils/action-logger.js'; @@ -75,7 +76,6 @@ import { RootContext } from './root-context.js'; import { MessageSearchProvider } from './search/search-provider.react.js'; import Socket from './socket.react.js'; -import { StaffContextProvider } from './staff/staff-context.provider.react.js'; import { useLoadCommFonts } from './themes/fonts.js'; import { DarkTheme, LightTheme } from './themes/navigation.js'; import ThemeHandler from './themes/theme-handler.react.js';