diff --git a/app/lib/database/appGroup.ts b/app/lib/database/appGroup.ts index 0a5a66066..292246935 100644 --- a/app/lib/database/appGroup.ts +++ b/app/lib/database/appGroup.ts @@ -1,6 +1,6 @@ import { NativeModules } from 'react-native'; -import { isIOS } from '../methods/helpers'; +import { isIOS } from '../methods/helpers/deviceInfo'; const { AppGroup } = NativeModules; diff --git a/app/lib/database/index.ts b/app/lib/database/index.ts index 5175810dd..da8328548 100644 --- a/app/lib/database/index.ts +++ b/app/lib/database/index.ts @@ -2,7 +2,7 @@ import { Database } from '@nozbe/watermelondb'; import SQLiteAdapter from '@nozbe/watermelondb/adapters/sqlite'; import logger from '@nozbe/watermelondb/utils/common/logger'; -import { isIOS } from '../methods/helpers'; +import { isIOS } from '../methods/helpers/deviceInfo'; import appGroup from './appGroup'; import { isOfficial } from '../constants'; import Subscription from './model/Subscription'; diff --git a/app/share.tsx b/app/share.tsx index 089181483..83a54cdc8 100644 --- a/app/share.tsx +++ b/app/share.tsx @@ -27,7 +27,7 @@ import AuthLoadingView from './views/AuthLoadingView'; import { DimensionsContext } from './dimensions'; import { debounce } from './lib/methods/helpers'; import { ShareInsideStackParamList, ShareOutsideStackParamList, ShareAppStackParamList } from './definitions/navigationTypes'; -import { colors, CURRENT_SERVER } from './lib/constants'; +import { colors, CURRENT_SERVER, TOKEN_KEY } from './lib/constants'; initStore(store); @@ -120,8 +120,9 @@ class Root extends React.Component<{}, IState> { init = async () => { const currentServer = UserPreferences.getString(CURRENT_SERVER); + const userId = UserPreferences.getString(`${TOKEN_KEY}-${currentServer}`); - if (currentServer) { + if (currentServer && userId) { await localAuthenticate(currentServer); this.setState({ root: 'inside' }); await shareExtensionInit(currentServer);