feat: create dyn antifraud

Closes #278

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-02-18 21:46:01 +08:00
parent 3191ae27a5
commit 6bc33795a3
7 changed files with 99 additions and 15 deletions

View File

@@ -7,6 +7,7 @@ import 'package:PiliPlus/pages/emote/view.dart';
import 'package:PiliPlus/pages/video/detail/reply_new/toolbar_icon_button.dart';
import 'package:PiliPlus/utils/extension.dart';
import 'package:PiliPlus/utils/storage.dart';
import 'package:PiliPlus/utils/utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
@@ -385,6 +386,13 @@ class _RepostPanelState extends CommonPublishPageState<RepostPanel> {
Get.back();
SmartDialog.showToast('转发成功');
widget.callback?.call();
if (GStorage.enableCreateDynAntifraud) {
try {
Utils.checkCreatedDyn(result['data']['dyn_id'], editController.text);
} catch (e) {
SmartDialog.showToast(e.toString());
}
}
} else {
SmartDialog.showToast(result['msg']);
}