Increase cache for public repeaters

This commit is contained in:
Janez T
2026-03-06 20:29:30 +01:00
parent 43f5702666
commit ca8e8e6ecb

View File

@@ -2035,60 +2035,118 @@ class _MessageBubbleState extends State<MessageBubble> {
const Icon(Icons.person, size: 16), const Icon(Icons.person, size: 16),
const SizedBox(width: 4), const SizedBox(width: 4),
Expanded( Expanded(
child: Column( child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Flexible(
displayName, child: Text(
style: Theme.of(context).textTheme.labelMedium displayName,
?.copyWith( style: Theme.of(context).textTheme.labelMedium
fontWeight: FontWeight.bold, ?.copyWith(
color: isOwnMessage fontWeight: FontWeight.bold,
? Theme.of(context).colorScheme.primary color: isOwnMessage
: null, ? Theme.of(context).colorScheme.primary
), : null,
maxLines: 1, ),
overflow: TextOverflow.ellipsis, maxLines: 1,
overflow: TextOverflow.ellipsis,
),
), ),
// Show destination/source context on a separate line.
if (!widget.isCompact && if (!widget.isCompact &&
(recipientSubtitle != null || (recipientSubtitle != null ||
receivedChannelSubtitle != null)) ...[ receivedChannelSubtitle != null)) ...[
const SizedBox(height: 2), const SizedBox(width: 8),
Row( if (message.isChannelMessage)
children: [ Flexible(
Icon( child: Container(
isOwnMessage padding: const EdgeInsets.symmetric(
? Icons.arrow_forward horizontal: 8,
: Icons.arrow_back, vertical: 3,
size: 12, ),
color: Theme.of(context) decoration: BoxDecoration(
.textTheme color: Theme.of(context)
.labelSmall .colorScheme
?.color .surfaceContainerHighest
?.withValues(alpha: 0.7), .withValues(alpha: 0.65),
), borderRadius: BorderRadius.circular(999),
const SizedBox(width: 4), ),
Expanded( child: Row(
child: Text( mainAxisSize: MainAxisSize.min,
isOwnMessage children: [
? recipientSubtitle! Icon(
: receivedChannelSubtitle!, isOwnMessage
style: Theme.of(context).textTheme.labelSmall ? Icons.campaign_outlined
?.copyWith( : Icons.tag,
color: Theme.of(context) size: 11,
color: Theme.of(context)
.textTheme
.labelSmall
?.color
?.withValues(alpha: 0.7),
),
const SizedBox(width: 5),
Flexible(
child: Text(
isOwnMessage
? recipientDisplayName!
: channelDisplayName!,
style: Theme.of(context)
.textTheme .textTheme
.labelSmall .labelSmall
?.color ?.copyWith(
?.withValues(alpha: 0.75), color: Theme.of(context)
fontStyle: FontStyle.italic, .textTheme
.labelSmall
?.color
?.withValues(alpha: 0.82),
fontWeight: FontWeight.w600,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
), ),
maxLines: 1, ),
overflow: TextOverflow.ellipsis, ],
), ),
), ),
], )
), else
Expanded(
child: Row(
children: [
Icon(
isOwnMessage
? Icons.arrow_forward
: Icons.arrow_back,
size: 12,
color: Theme.of(context)
.textTheme
.labelSmall
?.color
?.withValues(alpha: 0.7),
),
const SizedBox(width: 4),
Expanded(
child: Text(
isOwnMessage
? recipientSubtitle!
: receivedChannelSubtitle!,
style: Theme.of(context)
.textTheme
.labelSmall
?.copyWith(
color: Theme.of(context)
.textTheme
.labelSmall
?.color
?.withValues(alpha: 0.75),
fontStyle: FontStyle.italic,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
],
),
),
], ],
], ],
), ),