mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-12 00:40:28 +00:00
Add reply shortcut for messages
This commit is contained in:
@@ -44,6 +44,7 @@ import 'system_message_bubble.dart';
|
||||
class MessageBubble extends StatefulWidget {
|
||||
final Message message;
|
||||
final VoidCallback? onTap;
|
||||
final VoidCallback? onReply;
|
||||
final bool isHighlighted;
|
||||
final VoidCallback? onNavigateToMap;
|
||||
|
||||
@@ -54,6 +55,7 @@ class MessageBubble extends StatefulWidget {
|
||||
super.key,
|
||||
required this.message,
|
||||
this.onTap,
|
||||
this.onReply,
|
||||
this.isHighlighted = false,
|
||||
this.onNavigateToMap,
|
||||
this.isCompact = false,
|
||||
@@ -209,6 +211,15 @@ class _MessageBubbleState extends State<MessageBubble> {
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
if (!isOwnMessage && widget.onReply != null)
|
||||
ListTile(
|
||||
leading: const Icon(Icons.reply),
|
||||
title: Text(AppLocalizations.of(context)!.reply),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
widget.onReply?.call();
|
||||
},
|
||||
),
|
||||
// Copy text option
|
||||
ListTile(
|
||||
leading: const Icon(Icons.copy),
|
||||
|
||||
Reference in New Issue
Block a user