mirror of
https://github.com/standardnotes/mobile.git
synced 2026-04-19 21:58:51 -04:00
Fix require cycles
This commit is contained in:
@@ -239,6 +239,7 @@ export default class ApplicationState {
|
||||
unlockApplication() {
|
||||
this.notifyOfState(ApplicationState.Unlocking);
|
||||
this.setAuthenticationInProgress(false);
|
||||
KeysManager.get().updateScreenshotPrivacy();
|
||||
this.locked = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import {Platform} from 'react-native';
|
||||
import FlagSecure from 'react-native-flag-secure-android';
|
||||
import ApplicationState from "@Lib/ApplicationState"
|
||||
import FingerprintScanner from 'react-native-fingerprint-scanner';
|
||||
|
||||
import SF from './sfjs/sfjs'
|
||||
@@ -29,12 +28,6 @@ export default class KeysManager {
|
||||
}
|
||||
|
||||
async loadInitialData() {
|
||||
this.stateObserver = ApplicationState.get().addStateObserver((state) => {
|
||||
if(state == ApplicationState.Unlocking) {
|
||||
this.updateScreenshotPrivacy();
|
||||
}
|
||||
})
|
||||
|
||||
var storageKeys = ["auth_params", OfflineParamsKey, "user", FirstRunKey, StorageEncryptionKey];
|
||||
|
||||
return Promise.all([
|
||||
@@ -184,7 +177,7 @@ export default class KeysManager {
|
||||
}
|
||||
|
||||
updateScreenshotPrivacy(enabled) {
|
||||
if(ApplicationState.isIOS) {
|
||||
if(Platform.OS == "ios") {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Platform } from 'react-native';
|
||||
import FingerprintScanner from 'react-native-fingerprint-scanner'
|
||||
import ApplicationState from "@Lib/ApplicationState"
|
||||
import AuthenticationSource from "./AuthenticationSource"
|
||||
import KeysManager from "@Lib/keysManager"
|
||||
|
||||
@@ -59,7 +59,7 @@ export default class AuthenticationSourceBiometric extends AuthenticationSource
|
||||
async authenticate() {
|
||||
this.didBegin();
|
||||
|
||||
if(ApplicationState.isAndroid) {
|
||||
if(Platform.OS == "android") {
|
||||
return FingerprintScanner.authenticate({
|
||||
// onAttempt: this.handleInvalidAttempt
|
||||
}).then(() => {
|
||||
|
||||
Reference in New Issue
Block a user