make mention optional for replies

This commit is contained in:
Henry Hiles 2026-03-07 18:16:47 -05:00
commit eaebea4d44
No known key found for this signature in database
4 changed files with 26 additions and 2 deletions

View file

@ -8,10 +8,14 @@ class RelationPreview extends ConsumerWidget {
final Message? relatedMessage;
final RelationType relationType;
final VoidCallback onDismiss;
final bool shouldMention;
final VoidCallback toggleShouldMention;
const RelationPreview({
required this.relatedMessage,
required this.relationType,
required this.onDismiss,
required this.shouldMention,
required this.toggleShouldMention,
super.key,
});
@ -55,6 +59,18 @@ class RelationPreview extends ConsumerWidget {
maxLines: 1,
),
),
if (relationType == RelationType.reply)
TextButton(
onPressed: toggleShouldMention,
child: Text(
shouldMention ? "@On" : "@Off",
style: TextStyle(
fontWeight: FontWeight.w900,
color: shouldMention ? null : Theme.of(context).disabledColor,
),
),
),
IconButton(
tooltip:
"Cancel ${relationType == RelationType.edit ? "edit" : "reply"}",