From 5b52742cf708a09bf3f85c6a56ec939e6eb18f97 Mon Sep 17 00:00:00 2001 From: 21pages Date: Mon, 17 Jun 2024 10:35:57 +0800 Subject: [PATCH] fix mobile ab/group not update when login with 2fa/email (#8378) Signed-off-by: 21pages --- flutter/lib/common/widgets/login.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/flutter/lib/common/widgets/login.dart b/flutter/lib/common/widgets/login.dart index a6b8048a8..92528d5e3 100644 --- a/flutter/lib/common/widgets/login.dart +++ b/flutter/lib/common/widgets/login.dart @@ -455,7 +455,7 @@ Future loginDialog() async { } if (isEmailVerification != null) { if (isMobile) { - if (close != null) close(false); + if (close != null) close(null); verificationCodeDialog( resp.user, resp.secret, isEmailVerification); } else { @@ -712,6 +712,11 @@ Future verificationCodeDialog( dialogButton("Verify", onPressed: getOnSubmit()), ]); }); + // For verification code, desktop update other models in login dialog, mobile need to close login dialog first, + // otherwise the soft keyboard will jump out on each key press, so mobile update in verification code dialog. + if (isMobile && res == true) { + await UserModel.updateOtherModels(); + } return res; }