mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: custom grpc reply (#25)
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'package:PiliPalaX/grpc/app/main/community/reply/v1/reply.pb.dart';
|
||||
import 'package:PiliPalaX/http/loading_state.dart';
|
||||
import 'package:PiliPalaX/pages/common/reply_controller.dart';
|
||||
import 'package:PiliPalaX/utils/global_data.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:PiliPalaX/http/html.dart';
|
||||
import 'package:PiliPalaX/http/reply.dart';
|
||||
@@ -34,23 +35,22 @@ class DynamicDetailController extends ReplyController {
|
||||
queryData();
|
||||
}
|
||||
|
||||
// @override
|
||||
// Future<LoadingState> customGetData() => ReplyHttp.replyList(
|
||||
// isLogin: isLogin,
|
||||
// oid: oid!,
|
||||
// nextOffset: nextOffset,
|
||||
// type: type!,
|
||||
// sort: sortType.index,
|
||||
// page: currentPage,
|
||||
// );
|
||||
|
||||
@override
|
||||
Future<LoadingState> customGetData() => ReplyHttp.replyListGrpc(
|
||||
type: type ?? 1,
|
||||
oid: oid!,
|
||||
cursor: CursorReq(
|
||||
next: cursor?.next ?? $fixnum.Int64(0),
|
||||
mode: mode,
|
||||
),
|
||||
);
|
||||
Future<LoadingState> customGetData() => GlobalData().grpcReply
|
||||
? ReplyHttp.replyListGrpc(
|
||||
type: type ?? 1,
|
||||
oid: oid!,
|
||||
cursor: CursorReq(
|
||||
next: cursor?.next ?? $fixnum.Int64(0),
|
||||
mode: mode,
|
||||
),
|
||||
)
|
||||
: ReplyHttp.replyList(
|
||||
isLogin: isLogin,
|
||||
oid: oid!,
|
||||
nextOffset: nextOffset,
|
||||
type: type!,
|
||||
sort: sortType.index,
|
||||
page: currentPage,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user