From c3d23dfdba23325ec3b93c79054bfc0f656580c3 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Sun, 29 Sep 2024 15:29:08 +0800 Subject: [PATCH 1/5] typo --- lib/pages/video/detail/controller.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pages/video/detail/controller.dart b/lib/pages/video/detail/controller.dart index c8be4f43..d7b1529a 100644 --- a/lib/pages/video/detail/controller.dart +++ b/lib/pages/video/detail/controller.dart @@ -115,7 +115,7 @@ class VideoDetailController extends GetxController ].obs; RxDouble sheetHeight = 0.0.obs; RxString archiveSourceType = 'dash'.obs; - ScrollController? replyScrillController; + ScrollController? replyScrollController; List mediaList = []; RxBool isWatchLaterVisible = false.obs; RxString watchLaterTitle = ''.obs; @@ -574,12 +574,12 @@ class VideoDetailController extends GetxController } void onControllerCreated(ScrollController controller) { - replyScrillController = controller; + replyScrollController = controller; } void onTapTabbar(int index) { if (index == 1 && tabCtr.index == 1) { - replyScrillController?.animateTo(0, + replyScrollController?.animateTo(0, duration: const Duration(milliseconds: 300), curve: Curves.ease); } } From ed9a75ecd3c46bf91af15fbe30b264f2f6ebcc5c Mon Sep 17 00:00:00 2001 From: guozhigq Date: Mon, 30 Sep 2024 11:23:40 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20=E8=A7=86=E9=A2=91=E6=80=BB=E7=BB=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/models/video/ai.dart | 8 ++++---- .../video/detail/introduction/controller.dart | 4 ++-- lib/pages/video/detail/widgets/ai_detail.dart | 19 +++++++++++-------- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/lib/models/video/ai.dart b/lib/models/video/ai.dart index a06fa79d..0816c09d 100644 --- a/lib/models/video/ai.dart +++ b/lib/models/video/ai.dart @@ -39,11 +39,11 @@ class ModelResult { ModelResult.fromJson(Map json) { resultType = json['result_type']; summary = json['summary']; - outline = json['result_type'] == 2 - ? json['outline'] + outline = json['result_type'] == 0 + ? [] + : json['outline'] .map((e) => OutlineItem.fromJson(e)) - .toList() - : []; + .toList(); } } diff --git a/lib/pages/video/detail/introduction/controller.dart b/lib/pages/video/detail/introduction/controller.dart index 04a1249a..c0f6eebb 100644 --- a/lib/pages/video/detail/introduction/controller.dart +++ b/lib/pages/video/detail/introduction/controller.dart @@ -541,7 +541,7 @@ class VideoIntroController extends GetxController { // ai总结 Future aiConclusion() async { - SmartDialog.showLoading(msg: '正在生产ai总结'); + SmartDialog.showLoading(msg: '正在生成ai总结'); final res = await VideoHttp.aiConclusion( bvid: bvid, cid: lastPlayCid.value, @@ -551,7 +551,7 @@ class VideoIntroController extends GetxController { if (res['status']) { modelResult = res['data'].modelResult; } else { - SmartDialog.showToast("当前视频可能暂不支持AI视频总结"); + SmartDialog.showToast("当前视频暂不支持AI视频总结"); } return res; } diff --git a/lib/pages/video/detail/widgets/ai_detail.dart b/lib/pages/video/detail/widgets/ai_detail.dart index 37d51106..b71b026d 100644 --- a/lib/pages/video/detail/widgets/ai_detail.dart +++ b/lib/pages/video/detail/widgets/ai_detail.dart @@ -49,15 +49,18 @@ class AiDetail extends StatelessWidget { child: SingleChildScrollView( child: Column( children: [ - SelectableText( - modelResult!.summary!, - style: const TextStyle( - fontSize: 15, - fontWeight: FontWeight.bold, - height: 1.5, + if (modelResult!.resultType != 0 && + modelResult!.summary != '') ...[ + SelectableText( + modelResult!.summary!, + style: const TextStyle( + fontSize: 15, + fontWeight: FontWeight.bold, + height: 1.5, + ), ), - ), - const SizedBox(height: 20), + const SizedBox(height: 20), + ], ListView.builder( shrinkWrap: true, physics: const NeverScrollableScrollPhysics(), From 66d2ac9777bb3038e792d3d6e0ef7cc0c5eac921 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Mon, 30 Sep 2024 11:38:39 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix:=20=20=E7=B2=89=E4=B8=9D=E4=B8=8D?= =?UTF-8?q?=E5=8F=AF=E8=A7=81=E6=97=B6=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/fan/controller.dart | 1 - lib/pages/fan/view.dart | 14 +++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/pages/fan/controller.dart b/lib/pages/fan/controller.dart index c1c2a427..6661d9fe 100644 --- a/lib/pages/fan/controller.dart +++ b/lib/pages/fan/controller.dart @@ -49,7 +49,6 @@ class FansController extends GetxController { } else if (type == 'onLoad') { fansList.addAll(res['data'].list); } - print(total); if ((pn == 1 && total < ps) || res['data'].list.isEmpty) { loadingText.value = '没有更多了'; } diff --git a/lib/pages/fan/view.dart b/lib/pages/fan/view.dart index 47372057..5d5c02a7 100644 --- a/lib/pages/fan/view.dart +++ b/lib/pages/fan/view.dart @@ -103,9 +103,17 @@ class _FansPageState extends State { ), ); } else { - return HttpError( - errMsg: data['msg'], - fn: () => _fansController.queryFans('init'), + return CustomScrollView( + physics: const NeverScrollableScrollPhysics(), + slivers: [ + HttpError( + errMsg: data['msg'], + fn: () { + _futureBuilderFuture = + _fansController.queryFans('init'); + }, + ) + ], ); } } else { From 19866fe08054fe16b418f49017b41dff27a5c82a Mon Sep 17 00:00:00 2001 From: guozhigq Date: Mon, 30 Sep 2024 12:00:30 +0800 Subject: [PATCH 4/5] =?UTF-8?q?fix:=20=E8=A7=86=E9=A2=91=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E5=9B=9E=E9=A1=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/video/detail/controller.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/video/detail/controller.dart b/lib/pages/video/detail/controller.dart index d7b1529a..a57ec1de 100644 --- a/lib/pages/video/detail/controller.dart +++ b/lib/pages/video/detail/controller.dart @@ -578,7 +578,7 @@ class VideoDetailController extends GetxController } void onTapTabbar(int index) { - if (index == 1 && tabCtr.index == 1) { + if (tabCtr.animation!.isCompleted && index == 1 && tabCtr.index == 1) { replyScrollController?.animateTo(0, duration: const Duration(milliseconds: 300), curve: Curves.ease); } From 877eeded37c0f0cc5d08db915a1933e3b687433c Mon Sep 17 00:00:00 2001 From: guozhigq Date: Mon, 30 Sep 2024 13:09:40 +0800 Subject: [PATCH 5/5] =?UTF-8?q?fix:=20=E9=BB=91=E5=90=8D=E5=8D=95=E5=B1=95?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/blacklist/index.dart | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/pages/blacklist/index.dart b/lib/pages/blacklist/index.dart index 402790f5..fb7e0891 100644 --- a/lib/pages/blacklist/index.dart +++ b/lib/pages/blacklist/index.dart @@ -61,7 +61,7 @@ class _BlackListPageState extends State { centerTitle: false, title: Obx( () => Text( - '黑名单管理 - ${_blackListController.total.value}', + '黑名单管理 ${_blackListController.total.value == 0 ? '' : '- ${_blackListController.total.value}'}', style: Theme.of(context).textTheme.titleMedium, ), ), @@ -76,8 +76,12 @@ class _BlackListPageState extends State { if (data['status']) { List list = _blackListController.blackList; return Obx( - () => list.length == 1 - ? const SizedBox() + () => list.isEmpty + ? CustomScrollView( + slivers: [ + HttpError(errMsg: '你没有拉黑任何人哦~_~', fn: () => {}) + ], + ) : ListView.builder( controller: scrollController, itemCount: list.length,