feat(app): Runs and Chat tabs badge running runs and unread chats; unread chat rows carry a New badge
This commit is contained in:
@@ -81,8 +81,26 @@ class _AdaptiveShellState extends State<AdaptiveShell> {
|
||||
|
||||
/// The destination's icon; only Runs carries the attention count.
|
||||
Widget _icon(AppDestination destination, IconData data) {
|
||||
final icon = Icon(data);
|
||||
Widget icon = Icon(data);
|
||||
if (destination == AppDestination.chat) {
|
||||
return ActivityBadge(
|
||||
key: const ValueKey('shell.badge.chat.unread'),
|
||||
count: _bar.badge(destination, ShellBadgeKind.unread),
|
||||
label: 'unread chats',
|
||||
cupertino: widget.cupertino,
|
||||
child: icon,
|
||||
);
|
||||
}
|
||||
if (destination != AppDestination.runs) return icon;
|
||||
// Runs in progress at the bottom, runs that need you at the top.
|
||||
icon = ActivityBadge(
|
||||
key: const ValueKey('shell.badge.runs.running'),
|
||||
count: _bar.badge(destination, ShellBadgeKind.running),
|
||||
label: 'runs in progress',
|
||||
cupertino: widget.cupertino,
|
||||
bottom: true,
|
||||
child: icon,
|
||||
);
|
||||
return AttentionDestinationIcon(
|
||||
count: widget.attentionCount,
|
||||
cupertino: widget.cupertino,
|
||||
|
||||
Reference in New Issue
Block a user