Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2026-01-02 12:05:31 +08:00
parent 80e007bac6
commit 041af37bb0
67 changed files with 775 additions and 838 deletions

View File

@@ -43,10 +43,11 @@ class LikeMeController
cursorTime = data.total?.cursor?.time;
List<MsgLikeItem> latest = data.latest?.items ?? <MsgLikeItem>[];
List<MsgLikeItem> total = data.total?.items ?? <MsgLikeItem>[];
if (!isRefresh && loadingState.value.isSuccess) {
Pair<List<MsgLikeItem>, List<MsgLikeItem>> pair = loadingState.value.data;
latest.insertAll(0, pair.first);
total.insertAll(0, pair.second);
if (!isRefresh) {
if (loadingState.value case Success(:final response)) {
latest.insertAll(0, response.first);
total.insertAll(0, response.second);
}
}
loadingState.value = Success(Pair(first: latest, second: total));
return true;