mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: add reply
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -121,6 +121,7 @@ abstract class ReplyController extends CommonController {
|
||||
dynamic oid,
|
||||
dynamic replyItem,
|
||||
int index = 0,
|
||||
ReplyType? replyType,
|
||||
}) {
|
||||
dynamic key = oid ?? replyItem.oid + replyItem.id;
|
||||
Navigator.of(context)
|
||||
@@ -131,7 +132,9 @@ abstract class ReplyController extends CommonController {
|
||||
oid: oid ?? replyItem.oid.toInt(),
|
||||
root: oid != null ? 0 : replyItem.id.toInt(),
|
||||
parent: oid != null ? 0 : replyItem.id.toInt(),
|
||||
replyType: ReplyType.video,
|
||||
replyType: replyItem != null
|
||||
? ReplyType.values[replyItem.type.toInt()]
|
||||
: replyType,
|
||||
replyItem: replyItem,
|
||||
savedReply: savedReplies[key],
|
||||
onSaveReply: (reply) {
|
||||
|
||||
@@ -301,7 +301,11 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
|
||||
feedBack();
|
||||
dynamic oid = _dynamicDetailController.oid ??
|
||||
IdUtils.bv2av(Get.parameters['bvid']!);
|
||||
_dynamicDetailController.onReply(context, oid: oid);
|
||||
_dynamicDetailController.onReply(
|
||||
context,
|
||||
oid: oid,
|
||||
replyType: ReplyType.values[replyType],
|
||||
);
|
||||
},
|
||||
tooltip: '评论动态',
|
||||
child: const Icon(Icons.reply),
|
||||
|
||||
@@ -307,6 +307,7 @@ class _HtmlRenderPageState extends State<HtmlRenderPage>
|
||||
_htmlRenderCtr.onReply(
|
||||
context,
|
||||
oid: _htmlRenderCtr.oid.value,
|
||||
replyType: ReplyType.values[type],
|
||||
);
|
||||
},
|
||||
tooltip: '评论动态',
|
||||
|
||||
@@ -187,7 +187,11 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
||||
feedBack();
|
||||
dynamic oid = _videoReplyController.aid ??
|
||||
IdUtils.bv2av(Get.parameters['bvid']!);
|
||||
_videoReplyController.onReply(context, oid: oid);
|
||||
_videoReplyController.onReply(
|
||||
context,
|
||||
oid: oid,
|
||||
replyType: ReplyType.video,
|
||||
);
|
||||
},
|
||||
tooltip: '发表评论',
|
||||
child: const Icon(Icons.reply),
|
||||
|
||||
@@ -251,7 +251,7 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
|
||||
oid: oid,
|
||||
root: root,
|
||||
parent: parent,
|
||||
replyType: ReplyType.video,
|
||||
replyType: widget.replyType,
|
||||
replyItem: item,
|
||||
savedReply: _savedReplies[key],
|
||||
onSaveReply: (reply) {
|
||||
|
||||
@@ -27,8 +27,8 @@ class Utils {
|
||||
static final Random random = Random();
|
||||
|
||||
static ReplyInfo replyCast(res) {
|
||||
Map emote = res['content']['emote'];
|
||||
emote.forEach((key, value) {
|
||||
Map? emote = res['content']['emote'];
|
||||
emote?.forEach((key, value) {
|
||||
value['size'] = value['meta']['size'];
|
||||
});
|
||||
return ReplyInfo.create()
|
||||
|
||||
Reference in New Issue
Block a user