opt: reply item

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-07 10:09:34 +08:00
parent b14844f459
commit e073086cf4
8 changed files with 19 additions and 36 deletions

View File

@@ -3,6 +3,7 @@ import 'dart:math';
import 'package:PiliPlus/common/widgets/article_content.dart';
import 'package:PiliPlus/common/widgets/http_error.dart';
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
import 'package:PiliPlus/grpc/app/main/community/reply/v1/reply.pb.dart';
import 'package:PiliPlus/http/constants.dart';
import 'package:PiliPlus/http/loading_state.dart';
import 'package:PiliPlus/models/common/reply_sort_type.dart';
@@ -161,7 +162,7 @@ class _HtmlRenderPageState extends State<HtmlRenderPage>
}
}
void replyReply(context, replyItem, id) {
void replyReply(BuildContext context, ReplyInfo replyItem, int? id) {
EasyThrottle.throttle('replyReply', const Duration(milliseconds: 500), () {
int oid = replyItem.oid.toInt();
int rpid = replyItem.id.toInt();
@@ -784,11 +785,9 @@ class _HtmlRenderPageState extends State<HtmlRenderPage>
} else {
return ReplyItemGrpc(
replyItem: loadingState.response.replies[index],
showReplyRow: true,
replyLevel: '1',
replyReply: (replyItem, id) =>
replyReply(context, replyItem, id),
replyType: ReplyType.values[type],
onReply: () {
_htmlRenderCtr.onReply(
context,