Skip to content

Commit

Permalink
inbox [nfc]: Pull out _AtMentionMarker
Browse files Browse the repository at this point in the history
  • Loading branch information
sirpengi committed Feb 8, 2024
1 parent 8da5e30 commit 86ef337
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions lib/widgets/inbox.dart
Original file line number Diff line number Diff line change
Expand Up @@ -495,15 +495,25 @@ class _TopicItem extends StatelessWidget {
overflow: TextOverflow.ellipsis,
topic))),
const SizedBox(width: 12),
// Design for at-mention marker based on Figma screen:
// https://www.figma.com/file/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?type=design&node-id=224-16386&mode=design&t=JsNndFQ8fKFH0SjS-0
if (isMentioned) Padding(
padding: const EdgeInsetsDirectional.only(end: 4),
child: Icon(ZulipIcons.at_sign, size: 14, color:
const HSLColor.fromAHSL(0.5, 0, 0, 0.2).toColor())),
if (isMentioned) const _AtMentionMarker(),
Padding(padding: const EdgeInsetsDirectional.only(end: 16),
child: UnreadCountBadge(backgroundColor: subscription.colorSwatch(),
count: count)),
])))));
}
}

class _AtMentionMarker extends StatelessWidget {
const _AtMentionMarker();

static Color markerColor = const HSLColor.fromAHSL(0.5, 0, 0, 0.2).toColor();

@override
Widget build(BuildContext context) {
// Design for at-mention marker based on Figma screen:
// https://www.figma.com/file/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?type=design&node-id=224-16386&mode=design&t=JsNndFQ8fKFH0SjS-0
return Padding(
padding: const EdgeInsetsDirectional.only(end: 4),
child: Icon(ZulipIcons.at_sign, size: 14, color: markerColor));
}
}

0 comments on commit 86ef337

Please sign in to comment.