mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-23 04:00:28 +08:00
feat: edit dyn
feat: set pub setting feat: set reply interaction Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
@@ -3,6 +3,7 @@ import 'package:PiliPlus/common/widgets/flutter/draggable_sheet/draggable_scroll
|
||||
import 'package:PiliPlus/common/widgets/flutter/text_field/text_field.dart';
|
||||
import 'package:PiliPlus/common/widgets/image/network_img_layer.dart';
|
||||
import 'package:PiliPlus/http/dynamics.dart';
|
||||
import 'package:PiliPlus/http/loading_state.dart';
|
||||
import 'package:PiliPlus/models/common/publish_panel_type.dart';
|
||||
import 'package:PiliPlus/models/dynamics/result.dart';
|
||||
import 'package:PiliPlus/pages/common/publish/common_rich_text_pub_page.dart';
|
||||
@@ -419,7 +420,7 @@ class _RepostPanelState extends CommonRichTextPubPageState<RepostPanel> {
|
||||
if (hasRichText && repostContent != null) {
|
||||
richContent.addAll(repostContent);
|
||||
}
|
||||
final result = await DynamicsHttp.createDynamic(
|
||||
final res = await DynamicsHttp.createDynamic(
|
||||
mid: Accounts.main.mid,
|
||||
dynIdStr: widget.item?.idStr ?? widget.dynIdStr,
|
||||
rid: widget.rid,
|
||||
@@ -428,19 +429,19 @@ class _RepostPanelState extends CommonRichTextPubPageState<RepostPanel> {
|
||||
extraContent: richContent ?? repostContent,
|
||||
);
|
||||
SmartDialog.dismiss();
|
||||
if (result['status']) {
|
||||
if (res case Success(:final response)) {
|
||||
hasPub = true;
|
||||
Get.back();
|
||||
SmartDialog.showToast('转发成功');
|
||||
widget.onSuccess?.call();
|
||||
final id = result['data']?['dyn_id'];
|
||||
final id = response?['dyn_id'];
|
||||
RequestUtils.insertCreatedDyn(id);
|
||||
RequestUtils.checkCreatedDyn(
|
||||
id: id,
|
||||
dynText: editController.rawText,
|
||||
);
|
||||
} else {
|
||||
SmartDialog.showToast(result['msg']);
|
||||
res.toast();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user