Fix navbar notifications icon to only show when "has notifications" icon when undismissed ones

codemagic-setup
Hank Grabowski 2022-12-30 10:37:01 -05:00
rodzic 0c55723b04
commit ac6602dc45
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -23,7 +23,8 @@ class AppBottomNavBar extends StatelessWidget {
@override
Widget build(BuildContext context) {
final notificationManager = context.watch<NotificationsManager>();
final hasNotifications = notificationManager.notifications.isNotEmpty;
final hasNotifications =
notificationManager.notifications.where((n) => !n.dismissed).isNotEmpty;
return BottomNavigationBar(
onTap: (index) {
final newButton = _indexToButton(index);