feat: load config from text (#1772)

* feat: load config from text

* opt: login utils

* update

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
My-Responsitories
2025-12-09 22:09:57 +08:00
committed by GitHub
parent b4daf5fbd8
commit 244ef22f54
20 changed files with 264 additions and 208 deletions

View File

@@ -14,14 +14,16 @@ import 'package:flutter/material.dart';
import 'package:get/get.dart';
class PgcController
extends CommonListController<List<PgcIndexItem>?, PgcIndexItem> {
extends CommonListController<List<PgcIndexItem>?, PgcIndexItem>
with AccountMixin {
PgcController({required this.tabType});
final HomeTabType tabType;
late final showPgcTimeline =
tabType == HomeTabType.bangumi && Pref.showPgcTimeline;
AccountService accountService = Get.find<AccountService>();
@override
final accountService = Get.find<AccountService>();
@override
void onInit() {
@@ -92,7 +94,6 @@ class PgcController
}
followLoading = true;
var res = await FavHttp.favPgc(
mid: accountService.mid,
type: tabType == HomeTabType.bangumi ? 1 : 2,
pn: followPage,
);
@@ -142,4 +143,15 @@ class PgcController
followController?.dispose();
super.onClose();
}
@override
void onChangeAccount(bool isLogin) {
if (isLogin) {
followPage = 1;
followEnd = false;
queryPgcFollow();
} else {
followState.value = LoadingState.loading();
}
}
}