mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
refactor: history page
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -31,13 +31,12 @@ class DynamicsTabController extends CommonController {
|
||||
|
||||
@override
|
||||
bool customHandleResponse(Success response) {
|
||||
List currentList = loadingState.value is Success
|
||||
? (loadingState.value as Success).response
|
||||
: [];
|
||||
loadingState.value = offset == ''
|
||||
? LoadingState.success(response.response.items)
|
||||
: LoadingState.success(currentList + response.response.items);
|
||||
offset = response.response.offset;
|
||||
if (currentPage != 1 && loadingState.value is Success) {
|
||||
response.response.items
|
||||
.insertAll(0, (loadingState.value as Success).response);
|
||||
}
|
||||
loadingState.value = LoadingState.success(response.response.items);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user