diff --git a/lib/widgets/message_list.dart b/lib/widgets/message_list.dart index f041b1d0e4..0a03c00b4b 100644 --- a/lib/widgets/message_list.dart +++ b/lib/widgets/message_list.dart @@ -785,44 +785,46 @@ class MessageWithPossibleSender extends StatelessWidget { final Widget senderWidget; if (item.showSender) { - senderWidget = Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - crossAxisAlignment: CrossAxisAlignment.baseline, - textBaseline: TextBaseline.alphabetic, - children: [ - Flexible( - child: GestureDetector( - onTap: () => Navigator.push(context, - ProfilePage.buildRoute(context: context, - userId: message.senderId)), - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 2), - child: Row( - children: [ - Avatar(size: 32, borderRadius: 3, userId: message.senderId), - const SizedBox(width: 8), - Flexible( - child: Text(message.senderFullName, // TODO get from user data - style: const TextStyle( - fontFamily: 'Source Sans 3', - fontSize: 18, - height: (22 / 18), - ).merge(weightVariableTextStyle(context, wght: 600, - wghtIfPlatformRequestsBold: 900)), - overflow: TextOverflow.ellipsis), - ), - ]), - )), - ), - Text(time, - style: TextStyle( - color: _kMessageTimestampColor, - fontFamily: 'Source Sans 3', - fontSize: 16, - height: (18 / 16), - fontFeatures: const [FontFeature.enable('c2sc'), FontFeature.enable('smcp')], - ).merge(weightVariableTextStyle(context))), - ]); + senderWidget = Padding( + padding: const EdgeInsets.only(top: 4, left: 16, right: 16), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.baseline, + textBaseline: TextBaseline.alphabetic, + children: [ + Flexible( + child: GestureDetector( + onTap: () => Navigator.push(context, + ProfilePage.buildRoute(context: context, + userId: message.senderId)), + child: Padding( + padding: const EdgeInsets.symmetric(vertical: 2), + child: Row( + children: [ + Avatar(size: 32, borderRadius: 3, userId: message.senderId), + const SizedBox(width: 8), + Flexible( + child: Text(message.senderFullName, // TODO get from user data + style: const TextStyle( + fontFamily: 'Source Sans 3', + fontSize: 18, + height: (22 / 18), + ).merge(weightVariableTextStyle(context, wght: 600, + wghtIfPlatformRequestsBold: 900)), + overflow: TextOverflow.ellipsis), + ), + ]), + )), + ), + Text(time, + style: TextStyle( + color: _kMessageTimestampColor, + fontFamily: 'Source Sans 3', + fontSize: 16, + height: (18 / 16), + fontFeatures: const [FontFeature.enable('c2sc'), FontFeature.enable('smcp')], + ).merge(weightVariableTextStyle(context))), + ])); } else { senderWidget = const SizedBox.shrink(); } @@ -830,21 +832,25 @@ class MessageWithPossibleSender extends StatelessWidget { return GestureDetector( behavior: HitTestBehavior.translucent, onLongPress: () => showMessageActionSheet(context: context, message: message), - child: Padding( - padding: const EdgeInsets.symmetric(vertical: 4), - child: Row(crossAxisAlignment: CrossAxisAlignment.start, children: [ - const SizedBox(width: 16), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - senderWidget, - MessageContent(message: message, content: item.content), - if ((message.reactions?.total ?? 0) > 0) - ReactionChipsList(messageId: message.id, reactions: message.reactions!) - ])), - const SizedBox(width: 16), - ]))); + child: Column( + children: [ + senderWidget, + Padding( + padding: const EdgeInsets.symmetric(vertical: 4), + child: Row(crossAxisAlignment: CrossAxisAlignment.start, children: [ + const SizedBox(width: 16), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + MessageContent(message: message, content: item.content), + if ((message.reactions?.total ?? 0) > 0) + ReactionChipsList(messageId: message.id, reactions: message.reactions!) + ])), + const SizedBox(width: 16), + ])), + ], + )); } }