fix(mobile): enable workspaces (#1139)

This commit is contained in:
Mo
2022-06-22 11:52:32 -05:00
committed by GitHub
parent 480d17f2b6
commit 4db63e3a63
4 changed files with 3 additions and 14 deletions

View File

@@ -1,4 +1,3 @@
import { WorkspacesEnabled } from '@Lib/constants'
import AsyncStorage from '@react-native-community/async-storage'
import SNReactNative from '@standardnotes/react-native-utils'
import {
@@ -322,9 +321,7 @@ export class MobileDeviceInterface implements DeviceInterface {
}
performSoftReset() {
if (WorkspacesEnabled) {
SNReactNative.exitApp()
}
SNReactNative.exitApp()
}
// eslint-disable-next-line @typescript-eslint/no-empty-function

View File

@@ -1,7 +1,3 @@
import { IsDev } from '@Lib/Utils'
export enum ErrorMessage {
GeneralText = 'An error occurred. Please try again later.',
}
export const WorkspacesEnabled = IsDev

View File

@@ -1,4 +1,3 @@
import { WorkspacesEnabled } from '@Lib/constants'
import { useSignedIn } from '@Lib/SnjsHelperHooks'
import { useNavigation } from '@react-navigation/native'
import { ButtonCell } from '@Root/Components/ButtonCell'
@@ -80,9 +79,7 @@ export const OptionsSection = ({ title, encryptionAvailable }: Props) => {
let signoutText =
'Signing out will remove all data from this device, including notes and tags. Make sure your data is synced before proceeding.'
if (WorkspacesEnabled) {
signoutText += '\n\nYour app will quit after sign out completes.'
}
signoutText += '\n\nYour app will quit after sign out completes.'
if (await application.alertService.confirm(signoutText, 'Sign Out?', 'Sign Out', ButtonType.Danger)) {
await application.user.signOut()

View File

@@ -1,4 +1,3 @@
import { WorkspacesEnabled } from '@Lib/constants'
import { useSignedIn } from '@Lib/SnjsHelperHooks'
import { useSafeApplicationContext } from '@Root/Hooks/useSafeApplicationContext'
import { ModalStackNavigationProp } from '@Root/ModalStack'
@@ -56,7 +55,7 @@ export const Settings = (props: Props) => {
<Container keyboardShouldPersistTaps={'always'} keyboardDismissMode={'interactive'}>
<AuthSection title="Account" signedIn={signedIn} />
<OptionsSection encryptionAvailable={!!encryptionAvailable} title="Options" />
{WorkspacesEnabled && <WorkspacesSection />}
<WorkspacesSection />
<PreferencesSection />
{application.hasAccount() && isEntitledToFiles && <FilesSection />}
<SecuritySection