Skip to content

Commit 5b52742

Browse files
authored
fix mobile ab/group not update when login with 2fa/email (rustdesk#8378)
Signed-off-by: 21pages <[email protected]>
1 parent 237d234 commit 5b52742

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

flutter/lib/common/widgets/login.dart

+6-1
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ Future<bool?> loginDialog() async {
455455
}
456456
if (isEmailVerification != null) {
457457
if (isMobile) {
458-
if (close != null) close(false);
458+
if (close != null) close(null);
459459
verificationCodeDialog(
460460
resp.user, resp.secret, isEmailVerification);
461461
} else {
@@ -712,6 +712,11 @@ Future<bool?> verificationCodeDialog(
712712
dialogButton("Verify", onPressed: getOnSubmit()),
713713
]);
714714
});
715+
// For verification code, desktop update other models in login dialog, mobile need to close login dialog first,
716+
// otherwise the soft keyboard will jump out on each key press, so mobile update in verification code dialog.
717+
if (isMobile && res == true) {
718+
await UserModel.updateOtherModels();
719+
}
715720

716721
return res;
717722
}

0 commit comments

Comments
 (0)