Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Handle back-gesture dismissal in lock screen PIN/password auth

Manav Rathic57146c0ad87
diff --git a/mobile/packages/lock_screen/lib/local_authentication_service.dart b/mobile/packages/lock_screen/lib/local_authentication_service.dart
index eb1992a632..051659815d 100644
--- a/mobile/packages/lock_screen/lib/local_authentication_service.dart
+++ b/mobile/packages/lock_screen/lib/local_authentication_service.dart
@@ -112,7 +112,7 @@ class LocalAuthenticationService {
},
),
);
- if (result) {
+ if (result == true) {
return true;
}
}
@@ -129,7 +129,7 @@ class LocalAuthenticationService {
},
),
);
- if (result) {
+ if (result == true) {
return true;
}
}
diff --git a/mobile/packages/lock_screen/lib/ui/lock_screen_options.dart b/mobile/packages/lock_screen/lib/ui/lock_screen_options.dart
index 9bc4ef1afe..c35c5b363c 100644
--- a/mobile/packages/lock_screen/lib/ui/lock_screen_options.dart
+++ b/mobile/packages/lock_screen/lib/ui/lock_screen_options.dart
@@ -94,7 +94,7 @@ class _LockScreenOptionsState extends State<LockScreenOptions> {
}
Future<void> _pinLock() async {
- final bool result = await Navigator.of(context).push(
+ final result = await Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) {
return const LockScreenPin();
@@ -102,7 +102,7 @@ class _LockScreenOptionsState extends State<LockScreenOptions> {
),
);
- if (result) {
+ if (result == true) {
await _lockScreenSettings.setSystemLockScreen(false);
await _lockScreenSettings.setAppLockEnabled(true);
setState(() {
@@ -113,14 +113,14 @@ class _LockScreenOptionsState extends State<LockScreenOptions> {
}
Future<void> _passwordLock() async {
- final bool result = await Navigator.of(context).push(
+ final result = await Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) {
return const LockScreenPassword();
},
),
);
- if (result) {
+ if (result == true) {
await _lockScreenSettings.setSystemLockScreen(false);
setState(() {
appLock = _lockScreenSettings.getIsAppLockSet();