feat: account manager (#468)

* feat: account manager

* remove dep

* some fixes

* migrate accounts

* reimplement clearCookie
This commit is contained in:
My-Responsitories
2025-03-19 13:19:32 +08:00
committed by GitHub
parent 94fa0652ac
commit b15fdfa2ff
47 changed files with 1233 additions and 800 deletions

View File

@@ -1,4 +1,5 @@
import 'package:PiliPlus/http/loading_state.dart';
import 'package:PiliPlus/utils/accounts/account.dart';
import 'package:PiliPlus/utils/storage.dart';
import 'package:dio/dio.dart';
@@ -92,7 +93,7 @@ class DynamicsHttp {
dynamic id,
dynamic rid,
dynamic type,
bool? clearCookie,
bool clearCookie = false,
}) async {
var res = await Request().get(
Api.dynamicDetail,
@@ -104,7 +105,7 @@ class DynamicsHttp {
'features': 'itemOpusStyle',
},
options:
clearCookie == true ? Options(extra: {'clearCookie': true}) : null,
clearCookie ? Options(extra: {'account': AnonymousAccount()}) : null,
);
if (res.data['code'] == 0) {
try {