* opt: sized

* fix: self send

* feat: ctrl enter to send

* opt: checked

* opt: download notifier

* opt: Future.syncValue

* mod: account

* mod: loading state

* opt: DebounceStreamMixin

* opt: report

* opt: enum map

* opt: file handler

* opt: dyn color

* opt: Uint8List subview

* opt: FileExt

* opt: computeLuminance

* opt: isNullOrEmpty

* opt: Get context

* update [skip ci]

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* opt dynamicColor [skip ci]

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* fixes [skip ci]

* update

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

* update

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>

---------

Signed-off-by: My-Responsitories <107370289+My-Responsitories@users.noreply.github.com>
Co-authored-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
My-Responsitories
2025-12-17 17:01:10 +08:00
committed by GitHub
parent 02e0d34127
commit ce5e85e64b
87 changed files with 707 additions and 646 deletions

View File

@@ -10,7 +10,7 @@ import 'package:PiliPlus/utils/accounts.dart';
import 'package:PiliPlus/utils/accounts/account.dart';
import 'package:dio/dio.dart';
class ReplyHttp {
abstract final class ReplyHttp {
static final Options options = Options(
headers: {...Constants.baseHeaders, 'cookie': ''},
extra: {'account': const NoAccount()},
@@ -175,4 +175,35 @@ class ReplyHttp {
return Error(res.data['message']);
}
}
static Future<LoadingState<Null>> report({
required Object rpid,
required Object oid,
required int reasonType,
bool banUid = true,
String? reasonDesc,
}) async {
final res = await Request().post(
'/x/v2/reply/report',
data: {
'add_blacklist': banUid,
'csrf': Accounts.main.csrf,
'gaia_source': 'main_h5',
'oid': oid,
'platform': 'android',
'reason': reasonType,
'rpid': rpid,
'scene': 'main',
'type': 1,
if (reasonType == 0) 'content': reasonDesc!,
},
options: Options(contentType: Headers.formUrlEncodedContentType),
);
if (res.data['code'] == 0) {
return const Success(null);
} else {
return Error(res.data['message']);
}
}
}