Skip to content

Commit 2a473dd

Browse files
committed
msglist: Add star marker in messages
1 parent cdf86fe commit 2a473dd

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
@@ -913,12 +913,21 @@ class MessageWithPossibleSender extends StatelessWidget {
913913
if ((message.reactions?.total ?? 0) > 0)
914914
ReactionChipsList(messageId: message.id, reactions: message.reactions!)
915915
])),
916-
const SizedBox(width: 16),
916+
SizedBox(width: 16,
917+
child: message.flags.contains(MessageFlag.starred)
918+
// TODO(#157): fix how star marker aligns with message content
919+
// Design from Figma at:
920+
// https://www.figma.com/file/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=813%3A28817&mode=dev .
921+
? Padding(padding: const EdgeInsets.only(top: 4),
922+
child: FittedBox(child: Icon(ZulipIcons.star, color: _kStarColor)))
923+
: null),
917924
])),
918925
]));
919926
}
920927
}
921928

929+
final _kStarColor = const HSLColor.fromAHSL(0.5, 47, 1, 0.41).toColor();
930+
922931
// TODO web seems to ignore locale in formatting time, but we could do better
923932
final _kMessageTimestampFormat = DateFormat('h:mm aa', 'en_US');
924933

0 commit comments

Comments
 (0)