diff --git a/mobile/lib/ui/components/text_input_widget.dart b/mobile/lib/ui/components/text_input_widget.dart index 48ef8c2325..d97334585e 100644 --- a/mobile/lib/ui/components/text_input_widget.dart +++ b/mobile/lib/ui/components/text_input_widget.dart @@ -46,7 +46,7 @@ class TextInputWidget extends StatefulWidget { final ValueNotifier? isEmptyNotifier; final List? textInputFormatter; final TextInputType? textInputType; - final bool? enableFillColor; + final bool enableFillColor; const TextInputWidget({ this.onSubmit, this.onChange, diff --git a/mobile/lib/ui/settings/TEMP/lock_screen_option.dart b/mobile/lib/ui/settings/TEMP/lock_screen_option.dart index 9007266ff4..7ae211ce14 100644 --- a/mobile/lib/ui/settings/TEMP/lock_screen_option.dart +++ b/mobile/lib/ui/settings/TEMP/lock_screen_option.dart @@ -83,13 +83,8 @@ class _LockScreenOptionState extends State { } Future _onToggleSwitch() async { - if (appLock == false && !(isPasswordEnabled || isPinEnabled)) { - AppLock.of(context)!.setEnabled(!appLock); - await Configuration.instance.setShouldShowLockScreen(!appLock); - } else { - AppLock.of(context)!.setEnabled(!appLock); - await Configuration.instance.setShouldShowLockScreen(!appLock); - } + AppLock.of(context)!.setEnabled(!appLock); + await Configuration.instance.setShouldShowLockScreen(!appLock); await _configuration.removePinAndPassword(); setState(() { isPasswordEnabled = _configuration.isPasswordSet(); diff --git a/mobile/lib/ui/settings/TEMP/lock_screen_option_confirm_password.dart b/mobile/lib/ui/settings/TEMP/lock_screen_option_confirm_password.dart index 915152b576..ee59de455a 100644 --- a/mobile/lib/ui/settings/TEMP/lock_screen_option_confirm_password.dart +++ b/mobile/lib/ui/settings/TEMP/lock_screen_option_confirm_password.dart @@ -21,6 +21,7 @@ class LockScreenOptionConfirmPassword extends StatefulWidget { class _LockScreenOptionConfirmPasswordState extends State { + /// _confirmPasswordController is disposed by the [TextInputWidget] final _confirmPasswordController = TextEditingController(text: null); final Configuration _configuration = Configuration.instance; final _focusNode = FocusNode(); diff --git a/mobile/lib/ui/settings/TEMP/lock_screen_option_password.dart b/mobile/lib/ui/settings/TEMP/lock_screen_option_password.dart index 298998f7aa..cd86f75101 100644 --- a/mobile/lib/ui/settings/TEMP/lock_screen_option_password.dart +++ b/mobile/lib/ui/settings/TEMP/lock_screen_option_password.dart @@ -21,6 +21,7 @@ class LockScreenOptionPassword extends StatefulWidget { } class _LockScreenOptionPasswordState extends State { + /// _passwordController is disposed by the [TextInputWidget] final _passwordController = TextEditingController(text: null); final _focusNode = FocusNode(); final _isFormValid = ValueNotifier(false);