From be0d7eae45aa8d1305a72e6a928cc60a0bd5731a Mon Sep 17 00:00:00 2001 From: pengtao Date: Tue, 14 Oct 2025 15:55:11 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=88=91=E7=9A=84=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E9=A6=96=E6=AC=A1=E9=87=8D=E5=A4=8D=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/kt_pages/kt_my_list/logic.dart | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/kt_pages/kt_my_list/logic.dart b/lib/kt_pages/kt_my_list/logic.dart index 2bbbb73..80fab3b 100644 --- a/lib/kt_pages/kt_my_list/logic.dart +++ b/lib/kt_pages/kt_my_list/logic.dart @@ -38,8 +38,8 @@ class MyListLogic extends GetxController { state.loadStatus = KtLoadStatusType.loading; if (refresh) { state.curFavoriteIndex = 1; - state.favoriteList.clear(); - state.chestList.clear(); + // state.favoriteList.clear(); + // state.chestList.clear(); } if (loadMore) { state.curFavoriteIndex++; @@ -64,6 +64,10 @@ class MyListLogic extends GetxController { refreshCtrl.loadNoData(); chestRefreshCtrl.loadNoData(); } + if (refresh) { + state.favoriteList.clear(); + state.chestList.clear(); + } state.favoriteList.addAll(list); if (state.favoriteList.length > 3) { state.chestList = state.favoriteList.sublist(0, 3); @@ -86,7 +90,7 @@ class MyListLogic extends GetxController { getHistoryList({bool refresh = false, bool loadMore = false}) async { if (refresh) { state.curHistoryIndex = 1; - state.historyList.clear(); + // state.historyList.clear(); } if (loadMore) { state.curHistoryIndex++; @@ -107,7 +111,9 @@ class MyListLogic extends GetxController { ...res.data['list'].map((item) => KtHistoryVideoBean.fromJson(item)), ]; if (list.length < 20) refreshCtrl.loadNoData(); - + if (refresh) { + state.historyList.clear(); + } state.historyList.addAll(list); update(); } else {