π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob][auth] Fix 'App lock' not working onTap from security section on macOS and Linux
ashilknc3c2dd5cc63c
diff --git a/auth/lib/services/local_authentication_service.dart b/auth/lib/services/local_authentication_service.dartindex 9ca1636997..f47ed693cd 100644--- a/auth/lib/services/local_authentication_service.dart+++ b/auth/lib/services/local_authentication_service.dart@@ -23,7 +23,7 @@ class LocalAuthenticationService {BuildContext context,String infoMessage,) async {- if (await _isLocalAuthSupportedOnDevice()) {+ if (await isLocalAuthSupportedOnDevice()) {AppLock.of(context)!.setEnabled(false);final result = await requestAuthentication(context,@@ -94,7 +94,7 @@ class LocalAuthenticationService {String errorDialogContent, [String errorDialogTitle = "",]) async {- if (await _isLocalAuthSupportedOnDevice()) {+ if (await isLocalAuthSupportedOnDevice()) {AppLock.of(context)!.disable();final result = await requestAuthentication(context,@@ -120,7 +120,7 @@ class LocalAuthenticationService {return false;}- Future<bool> _isLocalAuthSupportedOnDevice() async {+ Future<bool> isLocalAuthSupportedOnDevice() async {try {return Platform.isMacOS || Platform.isLinux? await FlutterLocalAuthentication().canAuthenticate()diff --git a/auth/lib/ui/settings/security_section_widget.dart b/auth/lib/ui/settings/security_section_widget.dartindex 348c6304a5..c5349afa97 100644--- a/auth/lib/ui/settings/security_section_widget.dart+++ b/auth/lib/ui/settings/security_section_widget.dart@@ -23,7 +23,6 @@ import 'package:ente_auth/utils/platform_util.dart';import 'package:ente_auth/utils/toast_util.dart';import 'package:ente_crypto_dart/ente_crypto_dart.dart';import 'package:flutter/material.dart';-import 'package:local_auth/local_auth.dart';import 'package:logging/logging.dart';class SecuritySectionWidget extends StatefulWidget {@@ -144,7 +143,8 @@ class _SecuritySectionWidgetState extends State<SecuritySectionWidget> {trailingIcon: Icons.chevron_right_outlined,trailingIconIsMuted: true,onTap: () async {- if (await LocalAuthentication().isDeviceSupported()) {+ if (await LocalAuthenticationService.instance+ .isLocalAuthSupportedOnDevice()) {final bool result = await requestAuthentication(context,context.l10n.authToChangeLockscreenSetting,