opt: reply2reply: highlight item

This commit is contained in:
bggRGjQaUbCoE
2024-10-12 15:22:39 +08:00
parent 17f0277be9
commit e8207cba5d
3 changed files with 105 additions and 74 deletions

View File

@@ -47,58 +47,56 @@ class ReplyItemGrpc extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Material(
child: InkWell(
// 点击整个评论区 评论详情/回复
onTap: () {
feedBack();
if (replyReply != null) {
replyReply!(replyItem, null);
}
},
onLongPress: () {
feedBack();
// showDialog(
// context: Get.context!,
// builder: (_) => AlertDialog(
// content: SelectableText(
// jsonEncode(replyItem.replyControl.toProto3Json())),
// ),
// );
showModalBottomSheet(
context: context,
useRootNavigator: true,
isScrollControlled: true,
builder: (context) {
return MorePanel(
item: replyItem,
onDelete: (rpid) {
if (onDelete != null) {
onDelete!(rpid, null);
}
},
);
},
);
},
child: Column(
children: [
Padding(
padding: const EdgeInsets.fromLTRB(12, 14, 8, 5),
child: content(context),
),
if (needDivider)
Divider(
indent: 55,
endIndent: 15,
height: 0.3,
color: Theme.of(context)
.colorScheme
.onInverseSurface
.withOpacity(0.5),
)
],
),
return InkWell(
// 点击整个评论区 评论详情/回复
onTap: () {
feedBack();
if (replyReply != null) {
replyReply!(replyItem, null);
}
},
onLongPress: () {
feedBack();
// showDialog(
// context: Get.context!,
// builder: (_) => AlertDialog(
// content: SelectableText(
// jsonEncode(replyItem.replyControl.toProto3Json())),
// ),
// );
showModalBottomSheet(
context: context,
useRootNavigator: true,
isScrollControlled: true,
builder: (context) {
return MorePanel(
item: replyItem,
onDelete: (rpid) {
if (onDelete != null) {
onDelete!(rpid, null);
}
},
);
},
);
},
child: Column(
children: [
Padding(
padding: const EdgeInsets.fromLTRB(12, 14, 8, 5),
child: content(context),
),
if (needDivider)
Divider(
indent: 55,
endIndent: 15,
height: 0.3,
color: Theme.of(context)
.colorScheme
.onInverseSurface
.withOpacity(0.5),
)
],
),
);
}