mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-14 05:03:57 +08:00
Compare commits
2 Commits
release5
...
release5-f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bae395c5d0 | ||
|
|
e26ec2ea42 |
@@ -121,6 +121,7 @@ abstract class ReplyController extends CommonController {
|
|||||||
dynamic oid,
|
dynamic oid,
|
||||||
dynamic replyItem,
|
dynamic replyItem,
|
||||||
int index = 0,
|
int index = 0,
|
||||||
|
ReplyType? replyType,
|
||||||
}) {
|
}) {
|
||||||
dynamic key = oid ?? replyItem.oid + replyItem.id;
|
dynamic key = oid ?? replyItem.oid + replyItem.id;
|
||||||
Navigator.of(context)
|
Navigator.of(context)
|
||||||
@@ -131,7 +132,9 @@ abstract class ReplyController extends CommonController {
|
|||||||
oid: oid ?? replyItem.oid.toInt(),
|
oid: oid ?? replyItem.oid.toInt(),
|
||||||
root: oid != null ? 0 : replyItem.id.toInt(),
|
root: oid != null ? 0 : replyItem.id.toInt(),
|
||||||
parent: 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,
|
replyItem: replyItem,
|
||||||
savedReply: savedReplies[key],
|
savedReply: savedReplies[key],
|
||||||
onSaveReply: (reply) {
|
onSaveReply: (reply) {
|
||||||
@@ -163,7 +166,7 @@ abstract class ReplyController extends CommonController {
|
|||||||
MainListReply response =
|
MainListReply response =
|
||||||
(loadingState.value as Success?)?.response ?? MainListReply();
|
(loadingState.value as Success?)?.response ?? MainListReply();
|
||||||
if (oid != null) {
|
if (oid != null) {
|
||||||
response.replies.insert(0, replyInfo);
|
response.replies.insert(hasUpTop ? 1 : 0, replyInfo);
|
||||||
} else {
|
} else {
|
||||||
response.replies[index].replies.add(replyInfo);
|
response.replies[index].replies.add(replyInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -301,7 +301,11 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
|
|||||||
feedBack();
|
feedBack();
|
||||||
dynamic oid = _dynamicDetailController.oid ??
|
dynamic oid = _dynamicDetailController.oid ??
|
||||||
IdUtils.bv2av(Get.parameters['bvid']!);
|
IdUtils.bv2av(Get.parameters['bvid']!);
|
||||||
_dynamicDetailController.onReply(context, oid: oid);
|
_dynamicDetailController.onReply(
|
||||||
|
context,
|
||||||
|
oid: oid,
|
||||||
|
replyType: ReplyType.values[replyType],
|
||||||
|
);
|
||||||
},
|
},
|
||||||
tooltip: '评论动态',
|
tooltip: '评论动态',
|
||||||
child: const Icon(Icons.reply),
|
child: const Icon(Icons.reply),
|
||||||
|
|||||||
@@ -307,6 +307,7 @@ class _HtmlRenderPageState extends State<HtmlRenderPage>
|
|||||||
_htmlRenderCtr.onReply(
|
_htmlRenderCtr.onReply(
|
||||||
context,
|
context,
|
||||||
oid: _htmlRenderCtr.oid.value,
|
oid: _htmlRenderCtr.oid.value,
|
||||||
|
replyType: ReplyType.values[type],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
tooltip: '评论动态',
|
tooltip: '评论动态',
|
||||||
|
|||||||
@@ -187,7 +187,11 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
|||||||
feedBack();
|
feedBack();
|
||||||
dynamic oid = _videoReplyController.aid ??
|
dynamic oid = _videoReplyController.aid ??
|
||||||
IdUtils.bv2av(Get.parameters['bvid']!);
|
IdUtils.bv2av(Get.parameters['bvid']!);
|
||||||
_videoReplyController.onReply(context, oid: oid);
|
_videoReplyController.onReply(
|
||||||
|
context,
|
||||||
|
oid: oid,
|
||||||
|
replyType: ReplyType.video,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
tooltip: '发表评论',
|
tooltip: '发表评论',
|
||||||
child: const Icon(Icons.reply),
|
child: const Icon(Icons.reply),
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
|
|||||||
oid: oid,
|
oid: oid,
|
||||||
root: root,
|
root: root,
|
||||||
parent: parent,
|
parent: parent,
|
||||||
replyType: ReplyType.video,
|
replyType: widget.replyType,
|
||||||
replyItem: item,
|
replyItem: item,
|
||||||
savedReply: _savedReplies[key],
|
savedReply: _savedReplies[key],
|
||||||
onSaveReply: (reply) {
|
onSaveReply: (reply) {
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ class Utils {
|
|||||||
static final Random random = Random();
|
static final Random random = Random();
|
||||||
|
|
||||||
static ReplyInfo replyCast(res) {
|
static ReplyInfo replyCast(res) {
|
||||||
Map emote = res['content']['emote'];
|
Map? emote = res['content']['emote'];
|
||||||
emote.forEach((key, value) {
|
emote?.forEach((key, value) {
|
||||||
value['size'] = value['meta']['size'];
|
value['size'] = value['meta']['size'];
|
||||||
});
|
});
|
||||||
return ReplyInfo.create()
|
return ReplyInfo.create()
|
||||||
|
|||||||
Reference in New Issue
Block a user