fix: 评论加载

This commit is contained in:
guozhigq
2023-07-20 10:46:08 +08:00
parent 023e8013a5
commit ddc4a8eec2
3 changed files with 11 additions and 8 deletions

View File

@ -231,7 +231,7 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
@override
Widget build(BuildContext context) {
return SliverPadding(
padding: const EdgeInsets.only(left: 12, right: 12, top: 20),
padding: const EdgeInsets.only(left: 12, right: 12, top: 10),
sliver: SliverToBoxAdapter(
child: !widget.loadingStatus || videoItem.isNotEmpty
? Column(

View File

@ -53,9 +53,10 @@ class _VideoReplyPanelState extends State<VideoReplyPanel>
tag: widget.rpid.toString());
_videoReplyController.rPid = widget.rpid;
} else {
int oid = Get.parameters['bvid'] != null
? IdUtils.bv2av(Get.parameters['bvid']!)
: 0;
// fix 评论加载不对称
// int oid = Get.parameters['bvid'] != null
// ? IdUtils.bv2av(Get.parameters['bvid']!)
// : 0;
_videoReplyController = Get.put(VideoReplyController(oid, '', '1'),
tag: Get.arguments['heroTag']);
}

View File

@ -232,7 +232,7 @@ class _VideoDetailPageState extends State<VideoDetailPage>
children: [
Container(
width: double.infinity,
height: 0,
height: 45,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
@ -252,8 +252,8 @@ class _VideoDetailPageState extends State<VideoDetailPage>
() => TabBar(
controller: videoDetailController.tabCtr,
dividerColor: Colors.transparent,
indicatorColor:
Theme.of(context).colorScheme.background,
// indicatorColor:
// Theme.of(context).colorScheme.background,
tabs: videoDetailController.tabs
.map((String name) => Tab(text: name))
.toList(),
@ -278,7 +278,9 @@ class _VideoDetailPageState extends State<VideoDetailPage>
);
},
),
VideoReplyPanel()
VideoReplyPanel(
bvid: videoDetailController.bvid,
)
],
),
),