opt: remove reply after deleted

This commit is contained in:
bggRGjQaUbCoE
2024-09-06 11:19:08 +08:00
parent d5fbde70fa
commit c37f6835f8
3 changed files with 61 additions and 9 deletions

View File

@@ -127,7 +127,7 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
_videoReplyReplyController.replyList.add(replyItem);
},
replyType: widget.replyType,
replyReply: (replyItem) => replyReply(replyItem),
replyReply: replyReply,
needDivider: false,
onReply: () {
_onReply(widget.firstFloor);
@@ -164,8 +164,8 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
.add(replyItem);
},
replyType: widget.replyType,
replyReply: (replyItem) =>
replyReply(replyItem),
replyReply: replyReply,
needDivider: false,
onReply: () {
_onReply(_videoReplyReplyController.root);
},
@@ -227,6 +227,15 @@ class _VideoReplyReplyPanelState extends State<VideoReplyReplyPanel> {
_onReply(_videoReplyReplyController
.replyList[index]);
},
onDelete: (rpid, frpid) {
_videoReplyReplyController
.replyList.value =
_videoReplyReplyController
.replyList
.where((item) =>
item.rpid != rpid)
.toList();
},
);
}
},