mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
opt: save rcmd
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -36,10 +36,10 @@ class RcmdController extends CommonController {
|
||||
|
||||
@override
|
||||
List? handleListResponse(List currentList, List dataList) {
|
||||
bool shouldSaveLast = enableSaveLastData && currentPage == 0;
|
||||
if (shouldSaveLast) {
|
||||
int length = currentList.length;
|
||||
shouldSaveLast = length > 0 && length < 500;
|
||||
bool shouldSaveLast =
|
||||
enableSaveLastData && currentPage == 0 && currentList.isNotEmpty;
|
||||
if (shouldSaveLast && currentList.length > 500) {
|
||||
currentList = currentList.sublist(0, 50);
|
||||
}
|
||||
lastRefreshAt = shouldSaveLast && savedRcmdTip ? dataList.length : null;
|
||||
return shouldSaveLast ? dataList + currentList : null;
|
||||
|
||||
Reference in New Issue
Block a user