Skip to content

Commit e16e20c

Browse files
committed
msglist: Use special background color for DM messages, following web
Fixes-partly: zulip#157
1 parent 122ac4b commit e16e20c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/widgets/message_list.dart

+5-1
Original file line numberDiff line numberDiff line change
@@ -573,13 +573,17 @@ class MessageItem extends StatelessWidget {
573573
@override
574574
Widget build(BuildContext context) {
575575
final message = item.message;
576+
final backgroundColor = switch (message) {
577+
StreamMessage() => Colors.white,
578+
DmMessage() => const HSLColor.fromAHSL(1, 45, 0.2, 0.96).toColor(),
579+
};
576580
return StickyHeaderItem(
577581
allowOverflow: !item.isLastInBlock,
578582
header: header,
579583
child: _UnreadMarker(
580584
isRead: message.flags.contains(MessageFlag.read),
581585
child: ColoredBox(
582-
color: Colors.white,
586+
color: backgroundColor,
583587
child: Column(children: [
584588
MessageWithPossibleSender(item: item),
585589
if (trailingWhitespace != null && item.isLastInBlock) SizedBox(height: trailingWhitespace!),

0 commit comments

Comments
 (0)