diff --git a/lib/utils/accounts/account.dart b/lib/utils/accounts/account.dart index 06f5fa5a..2d4e5b3b 100644 --- a/lib/utils/accounts/account.dart +++ b/lib/utils/accounts/account.dart @@ -76,10 +76,12 @@ class LoginAccount implements Account { this.accessKey, this.refresh, [ Set? type, - ]) : type = type ?? {}; + ]) : type = type ?? {} { + cookieJar.setBuvid3(); + } factory LoginAccount.fromJson(Map json) => LoginAccount( - BiliCookieJar.fromJson(json['cookies'])..setBuvid3(), + BiliCookieJar.fromJson(json['cookies']), json['accessKey'], json['refresh'], (json['type'] as Iterable?)?.map((i) => AccountType.values[i]).toSet(),