mod: show count of reply2reply

This commit is contained in:
bggRGjQaUbCoE
2024-09-07 17:48:40 +08:00
parent 72a59384b9
commit cc56705714
5 changed files with 11 additions and 5 deletions

View File

@@ -153,13 +153,14 @@ class VideoDetailController extends GetxController
oid.value = IdUtils.bv2av(Get.parameters['bvid']!);
}
showReplyReplyPanel() {
showReplyReplyPanel(dynamic rcount) {
replyReplyBottomSheetCtr =
scaffoldKey.currentState?.showBottomSheet((BuildContext context) {
// SmartDialog.show(
// alignment: Alignment.bottomRight,
// builder: (context) {
return VideoReplyReplyPanel(
rcount: rcount,
oid: oid.value,
rpid: fRpid,
closePanel: () => {

View File

@@ -127,7 +127,7 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
videoDetailCtr.oid.value = replyItem.oid;
videoDetailCtr.fRpid = replyItem.rpid!;
videoDetailCtr.firstFloor = replyItem;
videoDetailCtr.showReplyReplyPanel();
videoDetailCtr.showReplyReplyPanel(replyItem.rcount);
}
}

View File

@@ -14,6 +14,7 @@ import 'controller.dart';
class VideoReplyReplyPanel extends StatefulWidget {
const VideoReplyReplyPanel({
this.rcount,
this.oid,
this.rpid,
this.closePanel,
@@ -22,6 +23,7 @@ class VideoReplyReplyPanel extends StatefulWidget {
this.replyType,
super.key,
});
final dynamic rcount;
final int? oid;
final int? rpid;
final Function? closePanel;
@@ -88,7 +90,7 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
const Text('评论详情'),
Text('评论详情${widget.rcount > 0 ? '${widget.rcount}' : ''}'),
IconButton(
tooltip: '关闭',
icon: const Icon(Icons.close, size: 20),