refactor: history page

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2024-11-28 20:49:07 +08:00
parent f4866258d2
commit 665dd8b92a
15 changed files with 327 additions and 374 deletions

View File

@@ -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;
}