From 300e5fc7931d8045f1835f91ef10960661ee4003 Mon Sep 17 00:00:00 2001 From: Reinaldo Neto <47038980+reinaldonetof@users.noreply.github.com> Date: Fri, 7 Oct 2022 12:34:51 -0300 Subject: [PATCH] [FIX] Touch/Face ID toggle does not enable automatically the first time (#4576) * [FIX] Touch/Face ID toggle does not enable automatically the first time * minor tweak no competition setState --- app/views/ScreenLockConfigView.tsx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/app/views/ScreenLockConfigView.tsx b/app/views/ScreenLockConfigView.tsx index a90bb4210..08ce03a45 100644 --- a/app/views/ScreenLockConfigView.tsx +++ b/app/views/ScreenLockConfigView.tsx @@ -91,14 +91,15 @@ class ScreenLockConfigView extends React.Component this.hasBiometry() + ); } catch (error) { // Do nothing } @@ -119,6 +120,11 @@ class ScreenLockConfigView extends React.Component { + const biometry = userPreferences.getBool(BIOMETRY_ENABLED_KEY) ?? DEFAULT_BIOMETRY; + this.setState({ biometry }); + }; + changePasscode = async ({ force }: { force: boolean }) => { logEvent(events.SLC_CHANGE_PASSCODE); await changePasscode({ force }); @@ -133,6 +139,7 @@ class ScreenLockConfigView extends React.Component