Skip to content

Commit

Permalink
msglist: Use special background color for DM messages, following web
Browse files Browse the repository at this point in the history
Fixes-partly: zulip#157
  • Loading branch information
chrisbobbe committed May 15, 2024
1 parent 122ac4b commit e16e20c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/widgets/message_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -573,13 +573,17 @@ class MessageItem extends StatelessWidget {
@override
Widget build(BuildContext context) {
final message = item.message;
final backgroundColor = switch (message) {
StreamMessage() => Colors.white,
DmMessage() => const HSLColor.fromAHSL(1, 45, 0.2, 0.96).toColor(),
};
return StickyHeaderItem(
allowOverflow: !item.isLastInBlock,
header: header,
child: _UnreadMarker(
isRead: message.flags.contains(MessageFlag.read),
child: ColoredBox(
color: Colors.white,
color: backgroundColor,
child: Column(children: [
MessageWithPossibleSender(item: item),
if (trailingWhitespace != null && item.isLastInBlock) SizedBox(height: trailingWhitespace!),
Expand Down

0 comments on commit e16e20c

Please sign in to comment.