mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: manual check dyn
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -123,6 +123,11 @@ class AccountManager extends Interceptor {
|
||||
}
|
||||
return handler.next(options);
|
||||
} else {
|
||||
if (account is AnonymousAccount) {
|
||||
options.headers[HttpHeaders.cookieHeader] = '';
|
||||
handler.next(options);
|
||||
return;
|
||||
}
|
||||
account.cookieJar.loadForRequest(options.uri).then((cookies) {
|
||||
final previousCookies =
|
||||
options.headers[HttpHeaders.cookieHeader] as String?;
|
||||
|
||||
@@ -472,12 +472,13 @@ class Utils {
|
||||
}
|
||||
}
|
||||
|
||||
static Future checkCreatedDyn(result, dynText) async {
|
||||
if (GStorage.enableCreateDynAntifraud) {
|
||||
static Future checkCreatedDyn({id, dynText, isManual}) async {
|
||||
if (isManual == true || GStorage.enableCreateDynAntifraud) {
|
||||
try {
|
||||
dynamic id = result['data']['dyn_id'];
|
||||
if (id != null) {
|
||||
await Future.delayed(const Duration(seconds: 5));
|
||||
if (isManual != true) {
|
||||
await Future.delayed(const Duration(seconds: 5));
|
||||
}
|
||||
dynamic res =
|
||||
await DynamicsHttp.dynamicDetail(id: id, clearCookie: true);
|
||||
showDialog(
|
||||
@@ -485,11 +486,13 @@ class Utils {
|
||||
builder: (context) => AlertDialog(
|
||||
title: Text('动态检查结果'),
|
||||
content: SelectableText(
|
||||
'${res['status'] ? '无账号状态下找到了你的动态,动态正常!' : '你的动态被shadow ban(仅自己可见)!'} \n\n动态内容: $dynText'),
|
||||
'${res['status'] ? '无账号状态下找到了你的动态,动态正常!' : '你的动态被shadow ban(仅自己可见)!'}${dynText != null ? ' \n\n动态内容: $dynText' : ''}'),
|
||||
),
|
||||
);
|
||||
}
|
||||
} catch (_) {}
|
||||
} catch (e) {
|
||||
debugPrint('check dyn error: $e');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user