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
|
@override
|
||||||
List? handleListResponse(List currentList, List dataList) {
|
List? handleListResponse(List currentList, List dataList) {
|
||||||
bool shouldSaveLast = enableSaveLastData && currentPage == 0;
|
bool shouldSaveLast =
|
||||||
if (shouldSaveLast) {
|
enableSaveLastData && currentPage == 0 && currentList.isNotEmpty;
|
||||||
int length = currentList.length;
|
if (shouldSaveLast && currentList.length > 500) {
|
||||||
shouldSaveLast = length > 0 && length < 500;
|
currentList = currentList.sublist(0, 50);
|
||||||
}
|
}
|
||||||
lastRefreshAt = shouldSaveLast && savedRcmdTip ? dataList.length : null;
|
lastRefreshAt = shouldSaveLast && savedRcmdTip ? dataList.length : null;
|
||||||
return shouldSaveLast ? dataList + currentList : null;
|
return shouldSaveLast ? dataList + currentList : null;
|
||||||
|
|||||||
Reference in New Issue
Block a user