fix mobile ab/group not update when login with 2fa/email (#8378)

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages 2024-06-17 10:35:57 +08:00 committed by GitHub
parent 237d234277
commit 5b52742cf7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -455,7 +455,7 @@ Future<bool?> 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<bool?> 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;
}