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:
@@ -48,14 +48,12 @@ class FavDetailController extends CommonController {
|
||||
isOwner.value = response.response.info.mid ==
|
||||
GStorage.userInfo.get('userInfoCache')?.mid;
|
||||
}
|
||||
List currentList = loadingState.value is Success
|
||||
? (loadingState.value as Success).response
|
||||
: [];
|
||||
List dataList = currentPage == 1
|
||||
? response.response.medias
|
||||
: currentList + response.response.medias;
|
||||
loadingState.value = LoadingState.success(dataList);
|
||||
if (dataList.length >= response.response.info.mediaCount) {
|
||||
if (currentPage != 1 && loadingState.value is Success) {
|
||||
response.response.medias
|
||||
.insertAll(0, (loadingState.value as Success).response);
|
||||
}
|
||||
loadingState.value = LoadingState.success(response.response.medias);
|
||||
if (response.response.medias.length >= response.response.info.mediaCount) {
|
||||
loadingText.value = '没有更多了';
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user