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 {