Improve system.service biometrics condition (#244)
This commit is contained in:
parent
3ac42f2f44
commit
8d161d9245
|
@ -28,6 +28,7 @@ export class ConstantsService {
|
|||
static readonly biometricUnlockKey: string = 'biometric';
|
||||
static readonly biometricText: string = 'biometricText';
|
||||
static readonly biometricAwaitingAcceptance: string = 'biometricAwaitingAcceptance';
|
||||
static readonly biometricFingerprintValidated: string = 'biometricFingerprintValidated';
|
||||
|
||||
readonly environmentUrlsKey: string = ConstantsService.environmentUrlsKey;
|
||||
readonly disableGaKey: string = ConstantsService.disableGaKey;
|
||||
|
@ -57,4 +58,5 @@ export class ConstantsService {
|
|||
readonly biometricUnlockKey: string = ConstantsService.biometricUnlockKey;
|
||||
readonly biometricText: string = ConstantsService.biometricText;
|
||||
readonly biometricAwaitingAcceptance: string = ConstantsService.biometricAwaitingAcceptance;
|
||||
readonly biometricFingerprintValidated: string = ConstantsService.biometricFingerprintValidated;
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ export class SystemService implements SystemServiceAbstraction {
|
|||
}
|
||||
|
||||
startProcessReload(): void {
|
||||
if (this.vaultTimeoutService.pinProtectedKey != null || this.vaultTimeoutService.biometricLocked || this.reloadInterval != null) {
|
||||
if (this.vaultTimeoutService.pinProtectedKey != null || this.reloadInterval != null) {
|
||||
return;
|
||||
}
|
||||
this.cancelProcessReload();
|
||||
|
@ -31,7 +31,9 @@ export class SystemService implements SystemServiceAbstraction {
|
|||
// Don't refresh if they are still active in the window
|
||||
doRefresh = diffSeconds >= 5000;
|
||||
}
|
||||
if (doRefresh) {
|
||||
const biometricLockedFingerprintValidated =
|
||||
await this.storageService.get<boolean>(ConstantsService.biometricFingerprintValidated) && this.vaultTimeoutService.biometricLocked;
|
||||
if (doRefresh && !biometricLockedFingerprintValidated) {
|
||||
clearInterval(this.reloadInterval);
|
||||
this.reloadInterval = null;
|
||||
this.messagingService.send('reloadProcess');
|
||||
|
|
Loading…
Reference in New Issue