From b649d8373d2808ff2d318ab15f0335d560199e32 Mon Sep 17 00:00:00 2001 From: zjs81 <30362347+zjs81@users.noreply.github.com> Date: Sat, 21 Nov 2026 02:41:05 -0700 Subject: [PATCH] Wrap channel bubble metadata row on narrow screens --- lib/screens/channel_chat_screen.dart | 47 ++++++++++++------------ test/screens/chat_bubble_width_test.dart | 5 ++- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/lib/screens/channel_chat_screen.dart b/lib/screens/channel_chat_screen.dart index f552dd3d..2fac04d9 100644 --- a/lib/screens/channel_chat_screen.dart +++ b/lib/screens/channel_chat_screen.dart @@ -1423,8 +1423,10 @@ class _ChannelChatScreenState extends State { bottom: 4, ) : EdgeInsets.zero, - child: Row( - mainAxisSize: MainAxisSize.min, + child: Wrap( + spacing: 4, + runSpacing: 2, + crossAxisAlignment: WrapCrossAlignment.center, children: [ Text( formatChatTime(context, message.timestamp), @@ -1433,30 +1435,30 @@ class _ChannelChatScreenState extends State { color: metaColor, ), ), - if (message.hasFutureTimestamp) ...[ - const SizedBox(width: 4), + if (message.hasFutureTimestamp) FutureTimestampIndicator(size: 16 * textScale), - ], if (enableTracing && !isOutgoing && - message.repeatCount > 0) ...[ - const SizedBox(width: 6), - Icon( - Icons.repeat, - size: 14 * textScale, - color: metaColor, + message.repeatCount > 0) + Row( + mainAxisSize: MainAxisSize.min, + children: [ + Icon( + Icons.repeat, + size: 14 * textScale, + color: metaColor, + ), + const SizedBox(width: 2), + Text( + '${message.repeatCount}', + style: MeshTheme.mono( + fontSize: 12 * textScale, + color: metaColor, + ), + ), + ], ), - const SizedBox(width: 2), - Text( - '${message.repeatCount}', - style: MeshTheme.mono( - fontSize: 12 * textScale, - color: metaColor, - ), - ), - ], - if (isOutgoing) ...[ - const SizedBox(width: 4), + if (isOutgoing) MessageStatusIcon( size: 16 * textScale, isAcked: false, @@ -1476,7 +1478,6 @@ class _ChannelChatScreenState extends State { ChannelMessageStatus.failed, onColor: metaColor, ), - ], ], ), ), diff --git a/test/screens/chat_bubble_width_test.dart b/test/screens/chat_bubble_width_test.dart index e8e6cfc3..5f17945a 100644 --- a/test/screens/chat_bubble_width_test.dart +++ b/test/screens/chat_bubble_width_test.dart @@ -58,8 +58,9 @@ class _ToggleConnector extends MeshCoreConnector { bool get isConnected => connected; } -DateTime _at(int seconds) => - DateTime.fromMillisecondsSinceEpoch(1700000000000 + seconds * 1000); +// Two-digit local hour (10:13 PM / 22:13) so narrow 2.0x text checks the wide +// timestamp layout regardless of host timezone. +DateTime _at(int seconds) => DateTime(2023, 11, 14, 22, 13, seconds); Future _seedRadio() async { final alice = Contact(