Skip to content

Commit

Permalink
msglist [nfc]: Group message and sender as Column of Rows, not vice v…
Browse files Browse the repository at this point in the history
…ersa

Moved widgets around such that the gutters to the
left and right of message contents are ready for
future decorative elements.
  • Loading branch information
sirpengi committed Jan 24, 2024
1 parent 97f6678 commit 058b5e4
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions lib/widgets/message_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -899,22 +899,22 @@ class MessageWithPossibleSender extends StatelessWidget {
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: [
if (senderRow != null) ...[
const SizedBox(height: 2),
senderRow,
const SizedBox(height: 4),
],
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: [
if (senderRow != null)
Padding(padding: const EdgeInsets.fromLTRB(16, 2, 16, 4),
child: senderRow),
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),
]),
])));
}
}
Expand Down

0 comments on commit 058b5e4

Please sign in to comment.