Skip to content

armgit / ente

Public Imported from GitHub
0

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

[auth] fix dialog not hiding after saving the codes/logs

Aman Raj8af02aa4c8da
diff --git a/auth/lib/ui/components/dialog_widget.dart b/auth/lib/ui/components/dialog_widget.dart
index a9daf59e33..bebd5c9f42 100644
--- a/auth/lib/ui/components/dialog_widget.dart
+++ b/auth/lib/ui/components/dialog_widget.dart
@@ -21,8 +21,10 @@ Future<ButtonResult?> showDialogWidget({
required List<ButtonWidget> buttons,
IconData? icon,
bool isDismissible = true,
+ bool useRootNavigator = false,
}) {
return showDialog(
+ useRootNavigator: useRootNavigator,
barrierDismissible: isDismissible,
barrierColor: backdropFaintDark,
context: context,
diff --git a/auth/lib/ui/tools/lock_screen.dart b/auth/lib/ui/tools/lock_screen.dart
index 4fb7759576..625101db6b 100644
--- a/auth/lib/ui/tools/lock_screen.dart
+++ b/auth/lib/ui/tools/lock_screen.dart
@@ -329,7 +329,7 @@ class _LockScreenState extends State<LockScreen> with WidgetsBindingObserver {
_isShowingLockScreen = false;
if (result) {
lastAuthenticatingTime = DateTime.now().millisecondsSinceEpoch;
- AppLock.of(context)!.didUnlock();
+ AppLock.of(context)?.didUnlock();
await _lockscreenSetting.setInvalidAttemptCount(0);
setState(() {
lockedTimeInSeconds = 15;
diff --git a/auth/lib/utils/dialog_util.dart b/auth/lib/utils/dialog_util.dart
index ffe08b42ac..f747b41f4d 100644
--- a/auth/lib/utils/dialog_util.dart
+++ b/auth/lib/utils/dialog_util.dart
@@ -413,9 +413,11 @@ Future<dynamic> showTextInputDialog(
TextCapitalization textCapitalization = TextCapitalization.none,
bool alwaysShowSuccessState = false,
bool isPasswordInput = false,
+ bool useRootNavigator = false,
}) {
return showDialog(
barrierColor: backdropFaintDark,
+ useRootNavigator: useRootNavigator,
context: context,
builder: (context) {
final bottomInset = MediaQuery.of(context).viewInsets.bottom;