fix(mobile): passcode timing options (#1744)
This commit is contained in:
@@ -32,7 +32,7 @@ import { PrefDefaults } from '@/Constants/PrefDefaults'
|
||||
type WebServices = {
|
||||
viewControllerManager: ViewControllerManager
|
||||
desktopService?: DesktopManager
|
||||
autolockService: AutolockService
|
||||
autolockService?: AutolockService
|
||||
archiveService: ArchiveManager
|
||||
themeService: ThemeManager
|
||||
io: IOService
|
||||
@@ -237,7 +237,7 @@ export class WebApplication extends SNApplication implements WebApplicationInter
|
||||
async handleMobileGainingFocusEvent(): Promise<void> {}
|
||||
|
||||
async handleMobileLosingFocusEvent(): Promise<void> {
|
||||
if (this.getMobileScreenshotPrivacyEnabled()) {
|
||||
if (this.protections.getMobileScreenshotPrivacyEnabled()) {
|
||||
this.mobileDevice().stopHidingMobileInterfaceFromScreenshots()
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ export class WebApplication extends SNApplication implements WebApplicationInter
|
||||
}
|
||||
|
||||
async handleMobileResumingFromBackgroundEvent(): Promise<void> {
|
||||
if (this.getMobileScreenshotPrivacyEnabled()) {
|
||||
if (this.protections.getMobileScreenshotPrivacyEnabled()) {
|
||||
this.mobileDevice().hideMobileInterfaceFromScreenshots()
|
||||
}
|
||||
}
|
||||
@@ -256,10 +256,10 @@ export class WebApplication extends SNApplication implements WebApplicationInter
|
||||
return
|
||||
}
|
||||
|
||||
const hasBiometrics = this.hasBiometrics()
|
||||
const hasBiometrics = this.protections.hasBiometricsEnabled()
|
||||
const hasPasscode = this.hasPasscode()
|
||||
const passcodeTiming = await this.getMobilePasscodeTiming()
|
||||
const biometricsTiming = await this.getMobileBiometricsTiming()
|
||||
const passcodeTiming = this.protections.getMobilePasscodeTiming()
|
||||
const biometricsTiming = this.protections.getMobileBiometricsTiming()
|
||||
|
||||
const passcodeLockImmediately = hasPasscode && passcodeTiming === MobileUnlockTiming.Immediately
|
||||
const biometricsLockImmediately = hasBiometrics && biometricsTiming === MobileUnlockTiming.Immediately
|
||||
|
||||
@@ -34,7 +34,6 @@ const createApplication = (
|
||||
const archiveService = new ArchiveManager(application)
|
||||
const io = new IOService(platform === Platform.MacWeb || platform === Platform.MacDesktop)
|
||||
const internalEventBus = new InternalEventBus()
|
||||
const autolockService = new AutolockService(application, internalEventBus)
|
||||
const themeService = new ThemeManager(application, internalEventBus)
|
||||
|
||||
application.setWebServices({
|
||||
@@ -42,7 +41,7 @@ const createApplication = (
|
||||
archiveService,
|
||||
desktopService: isDesktopDevice(device) ? new DesktopManager(application, device) : undefined,
|
||||
io,
|
||||
autolockService,
|
||||
autolockService: application.isNativeMobileWeb() ? undefined : new AutolockService(application, internalEventBus),
|
||||
themeService,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user