mod: 排名

This commit is contained in:
guozhigq
2023-04-29 17:30:54 +08:00
parent e971fbc876
commit 42fd0d7f62
8 changed files with 144 additions and 62 deletions

View File

@ -23,7 +23,7 @@ class VideoReplyController extends GetxController {
// 当前页
int currentPage = 0;
bool isLoadingMore = false;
bool noMore = false;
RxBool noMore = false.obs;
Future queryReplyList({type = 'init'}) async {
isLoadingMore = true;
@ -36,14 +36,17 @@ class VideoReplyController extends GetxController {
res['data'] = ReplyData.fromJson(res['data']);
if (res['data'].replies.isNotEmpty) {
currentPage = currentPage + 1;
noMore = false;
noMore.value = false;
} else {
if (currentPage == 0) {
} else {
noMore = true;
noMore.value = true;
return;
}
}
if (res['data'].replies.length >= res['data'].page.count) {
noMore.value = true;
}
if (type == 'init') {
List<ReplyItemModel> replies = res['data'].replies;
// 添加置顶回复