mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: handle response
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -29,7 +29,9 @@ abstract class CommonController extends GetxController {
|
||||
LoadingState response = await customGetData();
|
||||
if (response is Success) {
|
||||
if (!customHandleResponse(response)) {
|
||||
isEnd = response.response.isEmpty;
|
||||
if ((response.response as List?).isNullOrEmpty) {
|
||||
isEnd = true;
|
||||
}
|
||||
List currentList = loadingState.value is Success
|
||||
? (loadingState.value as Success).response
|
||||
: [];
|
||||
|
||||
Reference in New Issue
Block a user