mod: 本地缓存字段修改、登录状态

This commit is contained in:
guozhigq
2023-08-20 14:28:50 +08:00
parent 8627869309
commit 83341cd62b
29 changed files with 217 additions and 167 deletions

View File

@ -24,7 +24,8 @@ class _UpPanelState extends State<UpPanel> {
List<UpItem> upList = [];
List<LiveUserItem> liveList = [];
static const itemPadding = EdgeInsets.symmetric(horizontal: 5, vertical: 0);
Box user = GStrorage.user;
Box userInfoCache = GStrorage.userInfo;
var userInfo;
@override
void initState() {
@ -36,12 +37,13 @@ class _UpPanelState extends State<UpPanel> {
UpItem(
face: 'https://files.catbox.moe/8uc48f.png', uname: '全部动态', mid: -1),
);
userInfo = userInfoCache.get('userInfoCache');
upList.insert(
1,
UpItem(
face: user.get(UserBoxKey.userFace),
face: userInfo.face,
uname: '',
mid: user.get(UserBoxKey.userMid),
mid: userInfo.mid,
),
);
}