mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: login/logout
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -14,7 +14,7 @@ class HomeController extends GetxController with GetTickerProviderStateMixin {
|
||||
late TabController tabController;
|
||||
late List tabsCtrList;
|
||||
late List<Widget> tabsPageList;
|
||||
RxBool userLogin = false.obs;
|
||||
RxBool isLogin = false.obs;
|
||||
RxString userFace = ''.obs;
|
||||
dynamic userInfo;
|
||||
late final StreamController<bool> searchBarStream =
|
||||
@@ -32,7 +32,7 @@ class HomeController extends GetxController with GetTickerProviderStateMixin {
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
userInfo = GStorage.userInfo.get('userInfoCache');
|
||||
userLogin.value = userInfo != null;
|
||||
isLogin.value = userInfo != null;
|
||||
userFace.value = userInfo != null ? userInfo.face : '';
|
||||
hideSearchBar =
|
||||
GStorage.setting.get(SettingBoxKey.hideSearchBar, defaultValue: true);
|
||||
@@ -64,14 +64,6 @@ class HomeController extends GetxController with GetTickerProviderStateMixin {
|
||||
} catch (_) {}
|
||||
}
|
||||
|
||||
// 更新登录状态
|
||||
Future updateLoginStatus(val) async {
|
||||
userInfo = await GStorage.userInfo.get('userInfoCache');
|
||||
userLogin.value = val ?? false;
|
||||
if (val) return;
|
||||
userFace.value = userInfo != null ? userInfo.face : '';
|
||||
}
|
||||
|
||||
void setTabConfig() async {
|
||||
defaultTabs = [...tabsConfig];
|
||||
tabbarSort = GStorage.setting
|
||||
|
||||
Reference in New Issue
Block a user