Skip to content

Commit 058b5e4

Browse files
committed
msglist [nfc]: Group message and sender as Column of Rows, not vice versa
Moved widgets around such that the gutters to the left and right of message contents are ready for future decorative elements.
1 parent 97f6678 commit 058b5e4

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

lib/widgets/message_list.dart

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -899,22 +899,22 @@ class MessageWithPossibleSender extends StatelessWidget {
899899
onLongPress: () => showMessageActionSheet(context: context, message: message),
900900
child: Padding(
901901
padding: const EdgeInsets.symmetric(vertical: 4),
902-
child: Row(crossAxisAlignment: CrossAxisAlignment.start, children: [
903-
const SizedBox(width: 16),
904-
Expanded(
905-
child: Column(
906-
crossAxisAlignment: CrossAxisAlignment.stretch,
907-
children: [
908-
if (senderRow != null) ...[
909-
const SizedBox(height: 2),
910-
senderRow,
911-
const SizedBox(height: 4),
912-
],
913-
MessageContent(message: message, content: item.content),
914-
if ((message.reactions?.total ?? 0) > 0)
915-
ReactionChipsList(messageId: message.id, reactions: message.reactions!)
916-
])),
917-
const SizedBox(width: 16),
902+
child: Column(children: [
903+
if (senderRow != null)
904+
Padding(padding: const EdgeInsets.fromLTRB(16, 2, 16, 4),
905+
child: senderRow),
906+
Row(crossAxisAlignment: CrossAxisAlignment.start, children: [
907+
const SizedBox(width: 16),
908+
Expanded(
909+
child: Column(
910+
crossAxisAlignment: CrossAxisAlignment.stretch,
911+
children: [
912+
MessageContent(message: message, content: item.content),
913+
if ((message.reactions?.total ?? 0) > 0)
914+
ReactionChipsList(messageId: message.id, reactions: message.reactions!)
915+
])),
916+
const SizedBox(width: 16),
917+
]),
918918
])));
919919
}
920920
}

0 commit comments

Comments
 (0)