mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
revert: mainlist req
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -174,6 +174,7 @@ class ArticleController extends ReplyController<MainListReply> {
|
||||
type: commentType,
|
||||
oid: commentId,
|
||||
mode: mode.value,
|
||||
cursorNext: cursorNext,
|
||||
offset: paginationReply?.nextOffset,
|
||||
antiGoodsReply: antiGoodsReply,
|
||||
);
|
||||
|
||||
@@ -18,6 +18,7 @@ import 'package:PiliPlus/utils/request_utils.dart';
|
||||
import 'package:PiliPlus/utils/storage.dart';
|
||||
import 'package:PiliPlus/utils/utils.dart';
|
||||
import 'package:easy_debounce/easy_throttle.dart';
|
||||
import 'package:fixnum/fixnum.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -33,6 +34,7 @@ abstract class ReplyController<R> extends CommonListController<R, ReplyInfo> {
|
||||
late final bool isLogin = Accounts.main.isLogin;
|
||||
|
||||
dynamic upMid;
|
||||
Int64? cursorNext;
|
||||
FeedPaginationReply? paginationReply;
|
||||
late Rx<Mode> mode = Mode.MAIN_LIST_HOT.obs;
|
||||
late bool hasUpTop = false;
|
||||
@@ -74,6 +76,7 @@ abstract class ReplyController<R> extends CommonListController<R, ReplyInfo> {
|
||||
@override
|
||||
bool customHandleResponse(bool isRefresh, Success response) {
|
||||
MainListReply data = response.response;
|
||||
cursorNext = data.cursor.next;
|
||||
paginationReply = data.paginationReply;
|
||||
count.value = data.subjectControl.count.toInt();
|
||||
if (isRefresh) {
|
||||
@@ -89,6 +92,7 @@ abstract class ReplyController<R> extends CommonListController<R, ReplyInfo> {
|
||||
|
||||
@override
|
||||
Future onRefresh() {
|
||||
cursorNext = null;
|
||||
paginationReply = null;
|
||||
return super.onRefresh();
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ class DynamicDetailController extends ReplyController<MainListReply> {
|
||||
type: type,
|
||||
oid: oid,
|
||||
mode: mode.value,
|
||||
cursorNext: cursorNext,
|
||||
offset: paginationReply?.nextOffset,
|
||||
antiGoodsReply: antiGoodsReply,
|
||||
);
|
||||
|
||||
@@ -44,6 +44,7 @@ class VideoReplyController extends ReplyController<MainListReply>
|
||||
Future<LoadingState<MainListReply>> customGetData() => ReplyHttp.mainList(
|
||||
oid: aid,
|
||||
mode: mode.value,
|
||||
cursorNext: cursorNext,
|
||||
offset: paginationReply?.nextOffset,
|
||||
antiGoodsReply: antiGoodsReply,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user