Skip to content

Commit 86f62c9

Browse files
PIG208chrisbobbe
authored andcommitted
msglist [nfc]: Make trailingWhitespace a constant
This 11px whitespace can be traced back to 311d4d5 in 2022. While this is not present in the Figma design, it would be a good idea to refine it in the future. See discussion: #1453 (comment)
1 parent d81b812 commit 86f62c9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/widgets/message_list.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,6 @@ class _MessageListState extends State<MessageList> with PerAccountStoreAwareStat
750750
return MessageItem(
751751
key: ValueKey(data.message.id),
752752
header: header,
753-
trailingWhitespace: 11,
754753
item: data);
755754
}
756755
}
@@ -1048,12 +1047,10 @@ class MessageItem extends StatelessWidget {
10481047
super.key,
10491048
required this.item,
10501049
required this.header,
1051-
this.trailingWhitespace,
10521050
});
10531051

10541052
final MessageListMessageBaseItem item;
10551053
final Widget header;
1056-
final double? trailingWhitespace;
10571054

10581055
@override
10591056
Widget build(BuildContext context) {
@@ -1066,7 +1063,9 @@ class MessageItem extends StatelessWidget {
10661063
switch (item) {
10671064
MessageListMessageItem() => MessageWithPossibleSender(item: item),
10681065
},
1069-
if (trailingWhitespace != null && item.isLastInBlock) SizedBox(height: trailingWhitespace!),
1066+
// TODO refine this padding; discussion:
1067+
// https://github.com/zulip/zulip-flutter/pull/1453#discussion_r2106526985
1068+
if (item.isLastInBlock) const SizedBox(height: 11),
10701069
]));
10711070
if (item case MessageListMessageItem(:final message)) {
10721071
child = _UnreadMarker(

0 commit comments

Comments
 (0)