fix: typo

This commit is contained in:
orz12
2024-02-26 13:41:48 +08:00
parent 7cadf46bd6
commit 1e47096ffa

View File

@@ -35,13 +35,13 @@ class DynamicDetailController extends GetxController {
acount.value =
int.parse(item!.modules!.moduleStat!.comment!.count ?? '0');
}
int deaultReplySortIndex =
int defaultReplySortIndex =
setting.get(SettingBoxKey.replySortType, defaultValue: 0);
if (deaultReplySortIndex == 2) {
if (defaultReplySortIndex == 2) {
setting.put(SettingBoxKey.replySortType, 0);
deaultReplySortIndex = 0;
defaultReplySortIndex = 0;
}
_sortType = ReplySortType.values[deaultReplySortIndex];
_sortType = ReplySortType.values[defaultReplySortIndex];
sortTypeTitle.value = _sortType.titles;
sortTypeLabel.value = _sortType.labels;
}
@@ -50,12 +50,14 @@ class DynamicDetailController extends GetxController {
if (reqType == 'init') {
currentPage = 0;
}
isLoadingMore = true;
var res = await ReplyHttp.replyList(
oid: oid!,
pageNum: currentPage + 1,
type: type!,
sort: _sortType.index,
);
isLoadingMore = false;
if (res['status']) {
List<ReplyItemModel> replies = res['data'].replies;
acount.value = res['data'].page.acount;
@@ -84,7 +86,6 @@ class DynamicDetailController extends GetxController {
replyList.addAll(replies);
}
}
isLoadingMore = false;
return res;
}