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

@@ -13,9 +13,8 @@ class MemberDynamicCtr extends CommonController {
bool customHandleResponse(Success response) {
DynSpaceRsp res = response.response;
isEnd = !res.hasMore;
if (currentPage != 1) {
res.list.insertAll(
0, (loadingState.value as Success?)?.response ?? <DynamicItem>[]);
if (currentPage != 1 && loadingState.value is Success) {
res.list.insertAll(0, (loadingState.value as Success).response);
}
loadingState.value = LoadingState.success(res.list);
return true;