From 4b3e791370c904eeec9dc7b672945ffde2e719c4 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Sun, 8 Oct 2023 22:34:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?mod:=20=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/history/controller.dart | 1 + lib/pages/history/view.dart | 3 +++ lib/pages/history/widgets/item.dart | 6 +++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/pages/history/controller.dart b/lib/pages/history/controller.dart index dde9688e..aa098b2b 100644 --- a/lib/pages/history/controller.dart +++ b/lib/pages/history/controller.dart @@ -186,6 +186,7 @@ class HistoryController extends GetxController { } checkedCount.value = 0; SmartDialog.dismiss(); + enableMultiple.value = false; }, child: const Text('确认'), ) diff --git a/lib/pages/history/view.dart b/lib/pages/history/view.dart index cc6be6ca..d8fc60f0 100644 --- a/lib/pages/history/view.dart +++ b/lib/pages/history/view.dart @@ -37,6 +37,9 @@ class _HistoryPageState extends State { } }, ); + _historyController.enableMultiple.listen((p0) { + setState(() {}); + }); } // 选中 diff --git a/lib/pages/history/widgets/item.dart b/lib/pages/history/widgets/item.dart index 6fa87207..f531a276 100644 --- a/lib/pages/history/widgets/item.dart +++ b/lib/pages/history/widgets/item.dart @@ -215,7 +215,11 @@ class HistoryItem extends StatelessWidget { child: Container( decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), - color: Colors.black.withOpacity(0.6), + color: Colors.black.withOpacity( + ctr!.enableMultiple.value && + videoItem.checked + ? 0.6 + : 0), ), child: Center( child: SizedBox( From 77f47b82422a6ecff23737255889837fef43d095 Mon Sep 17 00:00:00 2001 From: guozhigq Date: Sun, 8 Oct 2023 22:44:49 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/history/controller.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/pages/history/controller.dart b/lib/pages/history/controller.dart index aa098b2b..e7822cd9 100644 --- a/lib/pages/history/controller.dart +++ b/lib/pages/history/controller.dart @@ -180,7 +180,11 @@ class HistoryController extends GetxController { List result = historyList.where((e) => e.checked!).toList(); for (HisListItem i in result) { - String resKid = 'archive_${i.kid}'; + String str = 'archive'; + try { + str = i.history!.business!; + } catch (_) {} + String resKid = '${str}_${i.kid}'; await UserHttp.delHistory(resKid); historyList.removeWhere((e) => e.kid == i.kid); }