mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: userInfoCache (#968)
This commit is contained in:
committed by
GitHub
parent
c75a68dacc
commit
e77fe2587c
@@ -1,5 +1,5 @@
|
||||
import 'package:PiliPlus/models/user/info.dart';
|
||||
import 'package:PiliPlus/utils/storage.dart' show GStorage;
|
||||
import 'package:PiliPlus/utils/storage_pref.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class AccountService extends GetxService {
|
||||
@@ -11,7 +11,7 @@ class AccountService extends GetxService {
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
UserInfoData? userInfo = GStorage.userInfo.get('userInfoCache');
|
||||
UserInfoData? userInfo = Pref.userInfoCache;
|
||||
mid = userInfo?.mid ?? 0;
|
||||
name = (userInfo?.uname ?? '').obs;
|
||||
face = (userInfo?.face ?? '').obs;
|
||||
|
||||
Reference in New Issue
Block a user