Skip to content

Commit 66b11d1

Browse files
committed
msglist: Add star marker in messages
1 parent 2e84ddd commit 66b11d1

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/widgets/message_list.dart

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,8 @@ class MessageWithPossibleSender extends StatelessWidget {
849849

850850
final MessageListMessageItem item;
851851

852+
static final _starColor = const HSLColor.fromAHSL(0.5, 47, 1, 0.41).toColor();
853+
852854
@override
853855
Widget build(BuildContext context) {
854856
final message = item.message;
@@ -910,7 +912,14 @@ class MessageWithPossibleSender extends StatelessWidget {
910912
if ((message.reactions?.total ?? 0) > 0)
911913
ReactionChipsList(messageId: message.id, reactions: message.reactions!)
912914
])),
913-
const SizedBox(width: 16),
915+
SizedBox(width: 16,
916+
child: message.flags.contains(MessageFlag.starred)
917+
// TODO(#157): fix how star marker aligns with message content
918+
// Design from Figma at:
919+
// https://www.figma.com/file/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=813%3A28817&mode=dev .
920+
? Padding(padding: const EdgeInsets.only(top: 3),
921+
child: Icon(ZulipIcons.star, size: 16, color: _starColor))
922+
: null),
914923
]),
915924
])));
916925
}

0 commit comments

Comments
 (0)