Skip to content
15 changes: 13 additions & 2 deletions WooCommerce/Classes/ViewRelated/MainTabBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -929,9 +929,20 @@ private extension MainTabBarController {
func updateMenuTabBadge(with action: NotificationBadgeActionType) {
let tab = WooTab.hubMenu
let tabIndex = tab.visibleIndex(isPOSTabVisible: isPOSTabVisible, isBookingsTabVisible: isBookingsTabVisible)
let input = NotificationsBadgeInput(action: action, tab: tab, tabBar: self.tabBar, tabIndex: tabIndex)
let isLiquidGlassDesignDisabled = Bundle.main.infoDictionary?["UIDesignRequiresCompatibility"] as? Bool ?? false

self.notificationsBadge.updateBadge(with: input)
guard !isLiquidGlassDesignDisabled else {
let input = NotificationsBadgeInput(action: action, tab: tab, tabBar: tabBar, tabIndex: tabIndex)
notificationsBadge.updateBadge(with: input)
return
}

switch action {
case .show:
tabBar.items?[tabIndex].badgeValue = "•"
case .hide:
tabBar.items?[tabIndex].badgeValue = nil
}
}
}

Expand Down