π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][auth] Minor fixes
Aman Raj Singh Mourya95a03ef86dd6
diff --git a/auth/lib/ui/settings/lock_screen/lock_screen_options.dart b/auth/lib/ui/settings/lock_screen/lock_screen_options.dartindex 29965a3b6c..df211a9cec 100644--- a/auth/lib/ui/settings/lock_screen/lock_screen_options.dart+++ b/auth/lib/ui/settings/lock_screen/lock_screen_options.dart@@ -44,10 +44,7 @@ class _LockScreenOptionsState extends State<LockScreenOptions> {hideAppContent = _lockscreenSetting.getShouldHideAppContent();autoLockTimeInMilliseconds = _lockscreenSetting.getAutoLockTime();_initializeSettings();- appLock = _lockscreenSetting.getIsAppLockSet() ||- _configuration.shouldShowSystemLockScreen() ||- isPasswordEnabled ||- isPinEnabled;+ appLock = _lockscreenSetting.getIsAppLockSet();}Future<void> _initializeSettings() async {@@ -87,7 +84,7 @@ class _LockScreenOptionsState extends State<LockScreenOptions> {},),);- await _lockscreenSetting.isAppLockSet(result);+ await _lockscreenSetting.setAppLockEnabled(result);await _initializeSettings();setState(() {if (result) {@@ -105,7 +102,7 @@ class _LockScreenOptionsState extends State<LockScreenOptions> {),);- await _lockscreenSetting.isAppLockSet(result);+ await _lockscreenSetting.setAppLockEnabled(result);await _initializeSettings();setState(() {if (result) {@@ -116,9 +113,15 @@ class _LockScreenOptionsState extends State<LockScreenOptions> {Future<void> _onToggleSwitch() async {AppLock.of(context)!.setEnabled(!appLock);- await _configuration.setSystemLockScreen(false);+ if (await LocalAuthenticationService.instance+ .isLocalAuthSupportedOnDevice()) {+ await _configuration.setSystemLockScreen(!appLock);+ await _lockscreenSetting.setAppLockEnabled(!appLock);+ } else {+ await _configuration.setSystemLockScreen(false);+ await _lockscreenSetting.setAppLockEnabled(false);+ }await _lockscreenSetting.removePinAndPassword();- await _lockscreenSetting.isAppLockSet(false);if (PlatformUtil.isMobile()) {await _lockscreenSetting.setHideAppContent(!appLock);setState(() {diff --git a/auth/lib/utils/lock_screen_settings.dart b/auth/lib/utils/lock_screen_settings.dartindex 14d56963ca..bd60c62445 100644--- a/auth/lib/utils/lock_screen_settings.dart+++ b/auth/lib/utils/lock_screen_settings.dart@@ -55,7 +55,7 @@ class LockScreenSettings {final bool systemLockEnabled =Configuration.instance.shouldShowSystemLockScreen();if (passwordEnabled || pinEnabled || systemLockEnabled) {- await isAppLockSet(true);+ await setAppLockEnabled(true);}}}@@ -104,7 +104,7 @@ class LockScreenSettings {await _preferences.setInt(keyInvalidAttempts, count);}- Future<void> isAppLockSet(bool value) async {+ Future<void> setAppLockEnabled(bool value) async {await _preferences.setBool(keyAppLockSet, value);}