opt: view invalid user space

Closes #414

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-03-10 15:03:55 +08:00
parent b75fda3596
commit 2ce79d21b5
7 changed files with 89 additions and 45 deletions

View File

@@ -21,6 +21,10 @@ abstract class CommonController extends GetxController {
return false;
}
bool handleError(String? errMsg) {
return false;
}
// void handleSuccess(List currentList, List dataList) {}
Future queryData([bool isRefresh = true]) async {
@@ -45,7 +49,8 @@ abstract class CommonController extends GetxController {
}
currentPage++;
} else {
if (isRefresh) {
if (isRefresh &&
handleError(response is Error ? response.errMsg : null).not) {
loadingState.value = response;
}
}