fix parsing configs

This commit is contained in:
nyne
2024-10-26 15:18:35 +08:00
parent 2a672f9715
commit e64b69d818
3 changed files with 3 additions and 6 deletions

View File

@@ -291,8 +291,6 @@ class AccountConfig {
final void Function() logout; final void Function() logout;
final bool allowReLogin;
final List<AccountInfoItem> infoItems; final List<AccountInfoItem> infoItems;
final bool Function(String url, String title)? checkLoginStatus; final bool Function(String url, String title)? checkLoginStatus;
@@ -312,8 +310,7 @@ class AccountConfig {
this.onLoginWithWebviewSuccess, this.onLoginWithWebviewSuccess,
this.cookieFields, this.cookieFields,
this.validateCookies, this.validateCookies,
) : allowReLogin = true, ) : infoItems = const [];
infoItems = const [];
} }
class AccountInfoItem { class AccountInfoItem {

View File

@@ -657,7 +657,7 @@ class ComicSourceParser {
Future<Res<List<Comic>>> Function(String? next, [String? folder])? loadNext; Future<Res<List<Comic>>> Function(String? next, [String? folder])? loadNext;
if (_checkExists("favorites.loadComic")) { if (_checkExists("favorites.loadComics")) {
loadComic = (int page, [String? folder]) async { loadComic = (int page, [String? folder]) async {
Future<Res<List<Comic>>> func() async { Future<Res<List<Comic>>> func() async {
try { try {

View File

@@ -86,7 +86,7 @@ class AccountsPage extends StatelessWidget {
); );
} }
} }
if (element.account!.allowReLogin) { if (element.data["account"] is List) {
bool loading = logic._reLogin[element.key] == true; bool loading = logic._reLogin[element.key] == true;
yield ListTile( yield ListTile(
title: Text("Re-login".tl), title: Text("Re-login".tl),