Skip to content

Commit ffa4ef6

Browse files
authored
[iOS 26] Replace custom tab dot with native tab badge when Liquid Glass design is enabled (#16161)
2 parents e769dc5 + d968d88 commit ffa4ef6

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

WooCommerce/Classes/ViewRelated/MainTabBarController.swift

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -929,9 +929,20 @@ private extension MainTabBarController {
929929
func updateMenuTabBadge(with action: NotificationBadgeActionType) {
930930
let tab = WooTab.hubMenu
931931
let tabIndex = tab.visibleIndex(isPOSTabVisible: isPOSTabVisible, isBookingsTabVisible: isBookingsTabVisible)
932-
let input = NotificationsBadgeInput(action: action, tab: tab, tabBar: self.tabBar, tabIndex: tabIndex)
932+
let isLiquidGlassDesignDisabled = Bundle.main.infoDictionary?["UIDesignRequiresCompatibility"] as? Bool ?? false
933933

934-
self.notificationsBadge.updateBadge(with: input)
934+
guard !isLiquidGlassDesignDisabled else {
935+
let input = NotificationsBadgeInput(action: action, tab: tab, tabBar: tabBar, tabIndex: tabIndex)
936+
notificationsBadge.updateBadge(with: input)
937+
return
938+
}
939+
940+
switch action {
941+
case .show:
942+
tabBar.items?[tabIndex].badgeValue = ""
943+
case .hide:
944+
tabBar.items?[tabIndex].badgeValue = nil
945+
}
935946
}
936947
}
937948

0 commit comments

Comments
 (0)