make pmp via text smaller

This commit is contained in:
Henry Hiles 2026-05-26 09:52:35 -04:00
commit ebbb4dc662
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -30,16 +30,31 @@ class MessageDisplayname extends ConsumerWidget {
globalPosition: details.globalPosition, globalPosition: details.globalPosition,
) )
: null, : null,
child: Text( child: Row(
"${membership.displayName ?? event.sender.localpart}${event.pmp == null ? "" : " (via ${event.sender})"}", mainAxisSize: MainAxisSize.min,
style: spacing: 4,
style ?? children: [
TextStyle( Text(
color: event.sender.colorHash, membership.displayName ?? event.sender.localpart,
fontWeight: FontWeight.bold, style:
style ??
TextStyle(
color: event.sender.colorHash,
fontWeight: FontWeight.bold,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
if (event.pmp != null)
Text(
"(via ${event.sender})",
style: Theme.of(context).textTheme.labelSmall?.copyWith(
color: event.sender.colorHash,
fontWeight: FontWeight.bold,
),
), ),
maxLines: 1, ],
overflow: TextOverflow.ellipsis,
), ),
), ),
loading: () => Text(""), loading: () => Text(""),