Skip to content

Commit 2c182c9

Browse files
committed
inbox [nfc]: Pull out _AtMentionMarker
1 parent 4aa6e65 commit 2c182c9

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

lib/widgets/inbox.dart

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -468,15 +468,25 @@ class _TopicItem extends StatelessWidget {
468468
overflow: TextOverflow.ellipsis,
469469
topic))),
470470
const SizedBox(width: 12),
471-
// Design for at-mention marker based on Figma screen:
472-
// https://www.figma.com/file/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?type=design&node-id=224-16386&mode=design&t=JsNndFQ8fKFH0SjS-0
473-
if (hasMention) Padding(
474-
padding: const EdgeInsetsDirectional.only(end: 4),
475-
child: Icon(ZulipIcons.at_sign, size: 14, color:
476-
const HSLColor.fromAHSL(0.5, 0, 0, 0.2).toColor())),
471+
if (hasMention) const _AtMentionMarker(),
477472
Padding(padding: const EdgeInsetsDirectional.only(end: 16),
478473
child: UnreadCountBadge(backgroundColor: subscription.colorSwatch(),
479474
count: count)),
480475
]))));
481476
}
482477
}
478+
479+
class _AtMentionMarker extends StatelessWidget {
480+
const _AtMentionMarker();
481+
482+
static final markerColor = const HSLColor.fromAHSL(0.5, 0, 0, 0.2).toColor();
483+
484+
@override
485+
Widget build(BuildContext context) {
486+
// Design for at-mention marker based on Figma screen:
487+
// https://www.figma.com/file/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?type=design&node-id=224-16386&mode=design&t=JsNndFQ8fKFH0SjS-0
488+
return Padding(
489+
padding: const EdgeInsetsDirectional.only(end: 4),
490+
child: Icon(ZulipIcons.at_sign, size: 14, color: markerColor));
491+
}
492+
}

0 commit comments

Comments
 (0)