mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-29 20:48:40 +00:00
mod: show count of reply2reply
This commit is contained in:
@@ -31,6 +31,7 @@ class ReplyItemModel {
|
|||||||
this.isUp,
|
this.isUp,
|
||||||
this.isTop,
|
this.isTop,
|
||||||
this.cardLabel,
|
this.cardLabel,
|
||||||
|
this.rcount,
|
||||||
});
|
});
|
||||||
|
|
||||||
int? rpid;
|
int? rpid;
|
||||||
@@ -61,6 +62,7 @@ class ReplyItemModel {
|
|||||||
bool? isUp;
|
bool? isUp;
|
||||||
bool? isTop = false;
|
bool? isTop = false;
|
||||||
List? cardLabel;
|
List? cardLabel;
|
||||||
|
dynamic rcount;
|
||||||
|
|
||||||
ReplyItemModel.fromJson(Map<String, dynamic> json, upperMid,
|
ReplyItemModel.fromJson(Map<String, dynamic> json, upperMid,
|
||||||
{isTopStatus = false}) {
|
{isTopStatus = false}) {
|
||||||
@@ -99,6 +101,7 @@ class ReplyItemModel {
|
|||||||
cardLabel = json['card_label'] != null
|
cardLabel = json['card_label'] != null
|
||||||
? json['card_label'].map((e) => e['text_content']).toList()
|
? json['card_label'].map((e) => e['text_content']).toList()
|
||||||
: [];
|
: [];
|
||||||
|
rcount = json['rcount'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
|
|||||||
titleSpacing: 0,
|
titleSpacing: 0,
|
||||||
centerTitle: false,
|
centerTitle: false,
|
||||||
title: Text(
|
title: Text(
|
||||||
'评论详情',
|
'评论详情${replyItem.rcount > 0 ? '(${replyItem.rcount})' : ''}',
|
||||||
style: Theme.of(context).textTheme.titleMedium,
|
style: Theme.of(context).textTheme.titleMedium,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -425,7 +425,7 @@ class _DynamicDetailPageState extends State<DynamicDetailPage>
|
|||||||
_dynamicDetailController.replyList[index],
|
_dynamicDetailController.replyList[index],
|
||||||
showReplyRow: true,
|
showReplyRow: true,
|
||||||
replyLevel: '1',
|
replyLevel: '1',
|
||||||
replyReply: (replyItem) => replyReply(replyItem),
|
replyReply: replyReply,
|
||||||
replyType: ReplyType.values[replyType],
|
replyType: ReplyType.values[replyType],
|
||||||
addReply: (replyItem) {
|
addReply: (replyItem) {
|
||||||
_dynamicDetailController
|
_dynamicDetailController
|
||||||
|
|||||||
@@ -153,13 +153,14 @@ class VideoDetailController extends GetxController
|
|||||||
oid.value = IdUtils.bv2av(Get.parameters['bvid']!);
|
oid.value = IdUtils.bv2av(Get.parameters['bvid']!);
|
||||||
}
|
}
|
||||||
|
|
||||||
showReplyReplyPanel() {
|
showReplyReplyPanel(dynamic rcount) {
|
||||||
replyReplyBottomSheetCtr =
|
replyReplyBottomSheetCtr =
|
||||||
scaffoldKey.currentState?.showBottomSheet((BuildContext context) {
|
scaffoldKey.currentState?.showBottomSheet((BuildContext context) {
|
||||||
// SmartDialog.show(
|
// SmartDialog.show(
|
||||||
// alignment: Alignment.bottomRight,
|
// alignment: Alignment.bottomRight,
|
||||||
// builder: (context) {
|
// builder: (context) {
|
||||||
return VideoReplyReplyPanel(
|
return VideoReplyReplyPanel(
|
||||||
|
rcount: rcount,
|
||||||
oid: oid.value,
|
oid: oid.value,
|
||||||
rpid: fRpid,
|
rpid: fRpid,
|
||||||
closePanel: () => {
|
closePanel: () => {
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
|
|||||||
videoDetailCtr.oid.value = replyItem.oid;
|
videoDetailCtr.oid.value = replyItem.oid;
|
||||||
videoDetailCtr.fRpid = replyItem.rpid!;
|
videoDetailCtr.fRpid = replyItem.rpid!;
|
||||||
videoDetailCtr.firstFloor = replyItem;
|
videoDetailCtr.firstFloor = replyItem;
|
||||||
videoDetailCtr.showReplyReplyPanel();
|
videoDetailCtr.showReplyReplyPanel(replyItem.rcount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import 'controller.dart';
|
|||||||
|
|
||||||
class VideoReplyReplyPanel extends StatefulWidget {
|
class VideoReplyReplyPanel extends StatefulWidget {
|
||||||
const VideoReplyReplyPanel({
|
const VideoReplyReplyPanel({
|
||||||
|
this.rcount,
|
||||||
this.oid,
|
this.oid,
|
||||||
this.rpid,
|
this.rpid,
|
||||||
this.closePanel,
|
this.closePanel,
|
||||||
@@ -22,6 +23,7 @@ class VideoReplyReplyPanel extends StatefulWidget {
|
|||||||
this.replyType,
|
this.replyType,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
final dynamic rcount;
|
||||||
final int? oid;
|
final int? oid;
|
||||||
final int? rpid;
|
final int? rpid;
|
||||||
final Function? closePanel;
|
final Function? closePanel;
|
||||||
@@ -88,7 +90,7 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
const Text('评论详情'),
|
Text('评论详情${widget.rcount > 0 ? '(${widget.rcount})' : ''}'),
|
||||||
IconButton(
|
IconButton(
|
||||||
tooltip: '关闭',
|
tooltip: '关闭',
|
||||||
icon: const Icon(Icons.close, size: 20),
|
icon: const Icon(Icons.close, size: 20),
|
||||||
|
|||||||
Reference in New Issue
Block a user