refactor: new mobile experience opt in flow (#1616)

* refactor: new mobile experience opt in flow

* chore: lint
This commit is contained in:
Mo
2022-09-22 11:20:26 -05:00
committed by GitHub
parent 3eebdbb77d
commit 76ec8b0f90
5 changed files with 79 additions and 21 deletions

View File

@@ -13,6 +13,7 @@ import {
platformFromString,
SNApplication,
SNComponentManager,
StorageValueModes,
} from '@standardnotes/snjs'
import { Platform } from 'react-native'
@@ -21,6 +22,7 @@ import { MobileAlertService } from './AlertService'
import { ApplicationState } from './ApplicationState'
import { BackupsService } from './BackupsService'
import { ComponentManager } from './ComponentManager'
import { AlwaysOpenWebAppOnLaunchKey } from './constants'
import { FilesService } from './FilesService'
import { InstallationService } from './InstallationService'
import { MobileDevice } from './Interface'
@@ -135,7 +137,8 @@ export class MobileApplication extends SNApplication {
}
promptForChallenge(challenge: Challenge) {
if (IsMobileWeb) {
const optedIntoWebPreview = this.getValue(AlwaysOpenWebAppOnLaunchKey, StorageValueModes.Nonwrapped) as boolean
if (IsMobileWeb || optedIntoWebPreview) {
return
}