diff --git a/ElementX/Sources/Application/Navigation/NavigationTabCoordinator.swift b/ElementX/Sources/Application/Navigation/NavigationTabCoordinator.swift index 8519dd1b6..6d28cca1c 100644 --- a/ElementX/Sources/Application/Navigation/NavigationTabCoordinator.swift +++ b/ElementX/Sources/Application/Navigation/NavigationTabCoordinator.swift @@ -447,7 +447,12 @@ struct TabRailView: View { } .buttonStyle(TabButtonStyle(isSelected: isSelected)) .accessibilityAddTraits(isSelected ? .isSelected : []) - .badge(10) // TODO: Check if this works. + .overlay(alignment: .topTrailing) { + if module.details.badgeCount > 0 { + NotificationCountBadge(count: module.details.badgeCount, size: .small) + .allowsHitTesting(false) + } + } } } .padding(.horizontal, 8) diff --git a/ElementX/Sources/FlowCoordinators/UserSessionFlowCoordinator.swift b/ElementX/Sources/FlowCoordinators/UserSessionFlowCoordinator.swift index e15dc861a..308891c7f 100644 --- a/ElementX/Sources/FlowCoordinators/UserSessionFlowCoordinator.swift +++ b/ElementX/Sources/FlowCoordinators/UserSessionFlowCoordinator.swift @@ -540,6 +540,8 @@ class UserSessionFlowCoordinator: FlowCoordinatorProtocol { let badgeCount = Int(userSession.clientProxy.totalUnreadNotifications) + chatsTabDetails.badgeCount = badgeCount + await flowParameters.notificationManager.removeDeliveredNotificationsForFullyReadRooms(roomSummaries) await flowParameters.notificationManager.updateAppBadgeCount(badgeCount) }