feat: bili comm antifraud

Closes #275

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-17 18:45:08 +08:00
parent 957c326148
commit 7ddc3adfaa
15 changed files with 196 additions and 112 deletions

View File

@@ -90,9 +90,8 @@ class PiliScheme {
// to check
// to video reply
String? oid = RegExp(r'/(\d+)').firstMatch(path)?.group(1);
if (oid != null) {
int? rpid =
int.tryParse(uri.queryParameters['comment_root_id']!);
int? rpid = int.tryParse(uri.queryParameters['comment_root_id']!);
if (oid != null && rpid != null) {
Get.to(
() => Scaffold(
resizeToAvoidBottomInset: false,
@@ -233,9 +232,9 @@ class PiliScheme {
if (path.startsWith("/detail/")) {
if (uri.queryParameters['comment_root_id'] != null) {
String? oid = RegExp(r'/(\d+)').firstMatch(path)?.group(1);
if (oid != null) {
int? rpid =
int.tryParse(uri.queryParameters['comment_root_id']!);
int? rpid =
int.tryParse(uri.queryParameters['comment_root_id']!);
if (oid != null && rpid != null) {
Get.to(
() => Scaffold(
resizeToAvoidBottomInset: false,
@@ -252,7 +251,7 @@ class PiliScheme {
],
),
body: VideoReplyReplyPanel(
oid: int.tryParse(oid),
oid: int.parse(oid),
rpid: rpid,
source: 'routePush',
replyType: ReplyType.dynamics,

View File

@@ -366,6 +366,9 @@ class GStorage {
static bool get enableCommAntifraud => GStorage.setting
.get(SettingBoxKey.enableCommAntifraud, defaultValue: false);
static bool get biliSendCommAntifraud => GStorage.setting
.get(SettingBoxKey.biliSendCommAntifraud, defaultValue: false);
static bool get coinWithLike =>
GStorage.setting.get(SettingBoxKey.coinWithLike, defaultValue: false);
@@ -609,6 +612,7 @@ class SettingBoxKey {
showSeekPreview = 'showSeekPreview',
showDmChart = 'showDmChart',
enableCommAntifraud = 'enableCommAntifraud',
biliSendCommAntifraud = 'biliSendCommAntifraud',
coinWithLike = 'coinWithLike',
isPureBlackTheme = 'isPureBlackTheme',
antiGoodsDyn = 'antiGoodsDyn',

View File

@@ -310,8 +310,11 @@ class Utils {
/// 点击评论action 直接查看评论
if (action == 'comment') {
Utils.toDupNamed('/dynamicDetail',
arguments: {'item': item, 'floor': floor, 'action': action});
Utils.toDupNamed('/dynamicDetail', arguments: {
'item': item,
'floor': floor,
'action': action,
});
return;
}