mod: 登录逻辑优化

This commit is contained in:
guozhigq
2023-08-31 22:41:19 +08:00
parent 01df8622e0
commit 9b1bb8c566
10 changed files with 71 additions and 74 deletions

View File

@ -48,9 +48,10 @@ class HomeController extends GetxController with GetTickerProviderStateMixin {
}
// 更新登录状态
void updateLoginStatus(val) {
userInfo = userInfoCache.get('userInfoCache');
void updateLoginStatus(val) async {
userInfo = await userInfoCache.get('userInfoCache');
userLogin.value = val ?? false;
if (val) return;
userFace.value = userInfo != null ? userInfo.face : '';
}
}