From 0ad54d8c0b52b886b8cf9e128bbec1cb9363976f Mon Sep 17 00:00:00 2001 From: guozhigq Date: Thu, 7 Sep 2023 19:25:35 +0800 Subject: [PATCH] =?UTF-8?q?mod:=20=E6=8E=A8=E8=8D=90=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=B6=E9=95=BF=E6=98=BE=E7=A4=BA=20issues?= =?UTF-8?q?=20#71=E3=80=81=E6=8E=A8=E8=8D=90=E6=A0=8F=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common/widgets/video_card_v.dart | 24 +++++++++++++++++------- lib/pages/rcmd/controller.dart | 2 +- lib/pages/rcmd/view.dart | 3 ++- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/lib/common/widgets/video_card_v.dart b/lib/common/widgets/video_card_v.dart index 1a5d4077..cc23f110 100644 --- a/lib/common/widgets/video_card_v.dart +++ b/lib/common/widgets/video_card_v.dart @@ -112,12 +112,22 @@ class VideoCardV extends StatelessWidget { height: maxHeight, ), ), - if (crossAxisCount == 1 && videoItem.duration != null) - PBadge( - bottom: 10, - right: 10, - text: videoItem.duration, - ) + if (videoItem.duration != null) + if (crossAxisCount == 1) ...[ + PBadge( + bottom: 10, + right: 10, + text: videoItem.duration, + ) + ] else ...[ + PBadge( + bottom: 6, + right: 7, + size: 'small', + type: 'gray', + text: videoItem.duration, + ) + ], ], ); }), @@ -174,7 +184,7 @@ class VideoContent extends StatelessWidget { ], ), if (crossAxisCount > 1) ...[ - const SizedBox(height: 3), + const SizedBox(height: 2), VideoStat( videoItem: videoItem, ), diff --git a/lib/pages/rcmd/controller.dart b/lib/pages/rcmd/controller.dart index 183b79bf..1f21ab0d 100644 --- a/lib/pages/rcmd/controller.dart +++ b/lib/pages/rcmd/controller.dart @@ -49,7 +49,7 @@ class RcmdController extends GetxController { videoList.value = res['data']; } } else if (type == 'onRefresh') { - videoList.insertAll(0, res['data']); + videoList.value = res['data']; } else if (type == 'onLoad') { videoList.addAll(res['data']); } diff --git a/lib/pages/rcmd/view.dart b/lib/pages/rcmd/view.dart index c8cf20d4..165613a6 100644 --- a/lib/pages/rcmd/view.dart +++ b/lib/pages/rcmd/view.dart @@ -77,7 +77,8 @@ class _RcmdPageState extends State ), child: RefreshIndicator( onRefresh: () async { - return await _rcmdController.onRefresh(); + await _rcmdController.onRefresh(); + await Future.delayed(const Duration(milliseconds: 300)); }, child: CustomScrollView( controller: _rcmdController.scrollController,