mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-10 03:57:49 +08:00
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:
committed by
GitHub
parent
b4daf5fbd8
commit
244ef22f54
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user