mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: custom grpc reply (#25)
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -111,11 +111,16 @@ class BlackListController extends CommonController {
|
||||
@override
|
||||
bool customHandleResponse(Success response) {
|
||||
total.value = response.response.total;
|
||||
isEnd = response.response.list.isEmpty;
|
||||
if (response.response.list.isEmpty) {
|
||||
isEnd = true;
|
||||
}
|
||||
if (currentPage != 1 && loadingState.value is Success) {
|
||||
response.response.list
|
||||
?.insertAll(0, (loadingState.value as Success).response);
|
||||
}
|
||||
if (response.response.list.length >= total.value) {
|
||||
isEnd = true;
|
||||
}
|
||||
loadingState.value = LoadingState.success(response.response.list);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user