diff --git a/lib/pages/common/reply_controller.dart b/lib/pages/common/reply_controller.dart index 4f5c860c7..3e20b0da5 100644 --- a/lib/pages/common/reply_controller.dart +++ b/lib/pages/common/reply_controller.dart @@ -115,6 +115,18 @@ abstract class ReplyController extends CommonController { int index = 0, ReplyType? replyType, }) { + String? hint; + try { + if (loadingState.value is Success) { + SubjectControl subjectControl = + (loadingState.value as Success).response.subjectControl; + if (subjectControl.hasSwitcherType() && + subjectControl.switcherType != 1 && + subjectControl.hasRootText()) { + hint = subjectControl.rootText; + } + } + } catch (_) {} dynamic key = oid ?? replyItem.oid + replyItem.id; Navigator.of(context) .push( @@ -132,6 +144,7 @@ abstract class ReplyController extends CommonController { onSave: (reply) { savedReplies[key] = reply; }, + hint: hint, ); }, transitionDuration: const Duration(milliseconds: 500), diff --git a/lib/pages/video/detail/reply_new/reply_page.dart b/lib/pages/video/detail/reply_new/reply_page.dart index 4fe4586e2..3d358024d 100644 --- a/lib/pages/video/detail/reply_new/reply_page.dart +++ b/lib/pages/video/detail/reply_new/reply_page.dart @@ -17,6 +17,7 @@ class ReplyPage extends CommonPublishPage { final int? parent; final ReplyType? replyType; final dynamic replyItem; + final String? hint; const ReplyPage({ super.key, @@ -28,6 +29,7 @@ class ReplyPage extends CommonPublishPage { this.parent, this.replyType, this.replyItem, + this.hint, }); @override @@ -161,8 +163,8 @@ class _ReplyPageState extends CommonPublishPageState { widget.onSave?.call(value); }, focusNode: focusNode, - decoration: const InputDecoration( - hintText: "输入回复内容", + decoration: InputDecoration( + hintText: widget.hint ?? "输入回复内容", border: InputBorder.none, hintStyle: TextStyle(fontSize: 14)), style: themeData.textTheme.bodyLarge,