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:
@@ -19,12 +19,11 @@ class LaterController extends CommonController {
|
||||
if (currentPage == 1) {
|
||||
count.value = response.response['count'];
|
||||
}
|
||||
List currentList = loadingState.value is Success
|
||||
? (loadingState.value as Success).response
|
||||
: [];
|
||||
loadingState.value = currentPage == 1
|
||||
? LoadingState.success(response.response['list'])
|
||||
: LoadingState.success(currentList + response.response['list']);
|
||||
if (currentPage != 1 && loadingState.value is Success) {
|
||||
response.response['list']
|
||||
.insertAll(0, (loadingState.value as Success).response);
|
||||
}
|
||||
loadingState.value = LoadingState.success(response.response['list']);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user