From 3ef3e3760d2103fb6e9eaee6ed3a189ce9c4fee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Wed, 31 Aug 2022 16:01:15 +0200 Subject: [PATCH] Fix crash on PIN code settings screen --- changelog.d/6979.bugfix | 1 + .../vector/app/features/settings/VectorSettingsPinFragment.kt | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelog.d/6979.bugfix diff --git a/changelog.d/6979.bugfix b/changelog.d/6979.bugfix new file mode 100644 index 0000000000..ee43e83e96 --- /dev/null +++ b/changelog.d/6979.bugfix @@ -0,0 +1 @@ +Fix crash on PIN code settings screen. diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPinFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPinFragment.kt index f3f013f2c7..0cd93f4ab1 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPinFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsPinFragment.kt @@ -50,7 +50,9 @@ class VectorSettingsPinFragment : override var titleRes = R.string.settings_security_application_protection_screen_title override val preferenceXmlRes = R.xml.vector_settings_pin - private val biometricHelper = biometricHelperFactory.create(defaultLockScreenConfiguration.copy(mode = LockScreenMode.CREATE)) + private val biometricHelper by lazy { + biometricHelperFactory.create(defaultLockScreenConfiguration.copy(mode = LockScreenMode.CREATE)) + } private val usePinCodePref by lazy { findPreference(VectorPreferences.SETTINGS_SECURITY_USE_PIN_CODE_FLAG)!!