opt: reply2reply request

This commit is contained in:
bggRGjQaUbCoE
2024-10-12 20:47:03 +08:00
parent bbbb089c65
commit cfcfa2da5b
3 changed files with 8 additions and 3 deletions

View File

@@ -135,6 +135,7 @@ class GrpcRepo {
int type = 1, int type = 1,
required int oid, required int oid,
required int root, required int root,
required int rpid,
required CursorReq cursor, required CursorReq cursor,
DetailListScene scene = DetailListScene.REPLY, DetailListScene scene = DetailListScene.REPLY,
}) async { }) async {
@@ -143,6 +144,7 @@ class GrpcRepo {
..oid = Int64(oid) ..oid = Int64(oid)
..type = Int64(type) ..type = Int64(type)
..root = Int64(root) ..root = Int64(root)
..rpid = Int64(rpid)
..cursor = cursor ..cursor = cursor
..scene = scene; ..scene = scene;
final response = await GrpcClient.instance.replyClient final response = await GrpcClient.instance.replyClient

View File

@@ -103,12 +103,14 @@ class ReplyHttp {
int type = 1, int type = 1,
required int oid, required int oid,
required int root, required int root,
required int rpid,
required CursorReq cursor, required CursorReq cursor,
}) async { }) async {
dynamic res = await GrpcRepo.detailList( dynamic res = await GrpcRepo.detailList(
type: type, type: type,
oid: oid, oid: oid,
root: root, root: root,
rpid: rpid,
cursor: cursor, cursor: cursor,
); );
if (res['status']) { if (res['status']) {

View File

@@ -18,7 +18,7 @@ class VideoReplyReplyController extends CommonController
); );
final itemScrollCtr = ItemScrollController(); final itemScrollCtr = ItemScrollController();
bool hasRoot = false; bool hasRoot = false;
dynamic id; int? id;
// 视频aid 请求时使用的oid // 视频aid 请求时使用的oid
int? aid; int? aid;
// rpid 请求楼中楼回复 // rpid 请求楼中楼回复
@@ -30,7 +30,7 @@ class VideoReplyReplyController extends CommonController
ReplyInfo? currentReplyItem; ReplyInfo? currentReplyItem;
CursorReply? cursor; CursorReply? cursor;
Rx<Mode> mode = Mode.MAIN_LIST_HOT.obs; Rx<Mode> mode = Mode.MAIN_LIST_TIME.obs;
RxInt count = (-1).obs; RxInt count = (-1).obs;
int? upMid; int? upMid;
@@ -101,7 +101,7 @@ class VideoReplyReplyController extends CommonController
index = replies.root.replies index = replies.root.replies
.map((item) => item.id.toInt()) .map((item) => item.id.toInt())
.toList() .toList()
.indexOf(id); .indexOf(id!);
if (index != -1) { if (index != -1) {
controller = AnimationController( controller = AnimationController(
duration: const Duration(milliseconds: 300), duration: const Duration(milliseconds: 300),
@@ -151,6 +151,7 @@ class VideoReplyReplyController extends CommonController
type: replyType.index, type: replyType.index,
oid: aid!, oid: aid!,
root: int.parse(rpid!), root: int.parse(rpid!),
rpid: id ?? 0,
cursor: CursorReq( cursor: CursorReq(
next: cursor?.next, next: cursor?.next,
mode: mode.value, mode: mode.value,