opt handle res

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-29 17:17:35 +08:00
parent b643cb1bd0
commit 924d51d41b
198 changed files with 3715 additions and 2001 deletions

View File

@@ -27,8 +27,8 @@ class RcmdController extends CommonListController {
@override
void handleListResponse(List dataList) {
if (enableSaveLastData && page == 0 && loadingState.value is Success) {
List? currentList = (loadingState.value as Success).response;
if (enableSaveLastData && page == 0 && loadingState.value.isSuccess) {
List? currentList = loadingState.value.data;
if (currentList?.isNotEmpty == true) {
if (savedRcmdTip) {
lastRefreshAt = dataList.length;

View File

@@ -105,8 +105,7 @@ class _RcmdPageState extends CommonPageState<RcmdPage, RcmdController>
controller.lastRefreshAt =
controller.lastRefreshAt! - 1;
}
((controller.loadingState.value as Success).response
as List)
controller.loadingState.value.data!
.removeAt(actualIndex);
controller.loadingState.refresh();
},
@@ -115,9 +114,7 @@ class _RcmdPageState extends CommonPageState<RcmdPage, RcmdController>
return VideoCardV(
videoItem: response[index],
onRemove: () {
((controller.loadingState.value as Success).response
as List)
.removeAt(index);
controller.loadingState.value.data!.removeAt(index);
controller.loadingState.refresh();
},
);