mod: 登录逻辑优化
This commit is contained in:
@ -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 : '';
|
||||
}
|
||||
}
|
||||
|
@ -134,11 +134,13 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
() => ctr!.userLogin.value
|
||||
? Stack(
|
||||
children: [
|
||||
NetworkImgLayer(
|
||||
type: 'avatar',
|
||||
width: 34,
|
||||
height: 34,
|
||||
src: ctr!.userFace.value,
|
||||
Obx(
|
||||
() => NetworkImgLayer(
|
||||
type: 'avatar',
|
||||
width: 34,
|
||||
height: 34,
|
||||
src: ctr!.userFace.value,
|
||||
),
|
||||
),
|
||||
Positioned.fill(
|
||||
child: Material(
|
||||
|
Reference in New Issue
Block a user