opt mouse control

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-09-28 15:33:09 +08:00
parent 2031604ea2
commit 5f8dc76891
19 changed files with 268 additions and 191 deletions

View File

@@ -78,6 +78,25 @@ class ReplyItemGrpc extends StatelessWidget {
@override
Widget build(BuildContext context) {
final ThemeData theme = Theme.of(context);
final isMobile = Utils.isMobile;
void showMore() => showModalBottomSheet(
context: context,
useSafeArea: true,
isScrollControlled: true,
constraints: BoxConstraints(
maxWidth: min(640, context.mediaQueryShortestSide),
),
builder: (context) {
return morePanel(
context: context,
item: replyItem,
onDelete: () => onDelete?.call(replyItem, null),
isSubReply: false,
);
},
);
return Material(
type: MaterialType.transparency,
child: InkWell(
@@ -85,25 +104,13 @@ class ReplyItemGrpc extends StatelessWidget {
feedBack();
replyReply?.call(replyItem, null);
},
onLongPress: () {
feedBack();
showModalBottomSheet(
context: context,
useSafeArea: true,
isScrollControlled: true,
constraints: BoxConstraints(
maxWidth: min(640, context.mediaQueryShortestSide),
),
builder: (context) {
return morePanel(
context: context,
item: replyItem,
onDelete: () => onDelete?.call(replyItem, null),
isSubReply: false,
);
},
);
},
onLongPress: isMobile
? () {
feedBack();
showMore();
}
: null,
onSecondaryTap: isMobile ? null : showMore,
child: _buildContent(context, theme),
),
);