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,8 +30,12 @@ class MessageDisplayname extends ConsumerWidget {
globalPosition: details.globalPosition,
)
: null,
child: Text(
"${membership.displayName ?? event.sender.localpart}${event.pmp == null ? "" : " (via ${event.sender})"}",
child: Row(
mainAxisSize: MainAxisSize.min,
spacing: 4,
children: [
Text(
membership.displayName ?? event.sender.localpart,
style:
style ??
TextStyle(
@ -41,6 +45,17 @@ class MessageDisplayname extends ConsumerWidget {
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,
),
),
],
),
),
loading: () => Text(""),
);