Skip to content

Commit 35d3524

Browse files
committed
fix: keep the feature flag disabled logic (managing both hub menu tab and reviews tab badge count update)
1 parent fa0653d commit 35d3524

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

WooCommerce/Classes/ViewRelated/MainTabBarController.swift

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -494,12 +494,16 @@ private extension MainTabBarController {
494494
/// Displays or Hides the Dot on the Hub Menu tab, depending on the notification count
495495
///
496496
func updateHubMenuTabBadge(count: Int) {
497-
guard isHubMenuFeatureFlagOn else {
498-
return
497+
if isHubMenuFeatureFlagOn {
498+
let tab = WooTab.hubMenu
499+
let tabIndex = tab.visibleIndex(isHubMenuFeatureFlagOn)
500+
notificationsBadge.badgeCountWasUpdated(newValue: count, tab: tab, in: tabBar, tabIndex: tabIndex)
501+
}
502+
else {
503+
let tab = WooTab.reviews
504+
let tabIndex = tab.visibleIndex(isHubMenuFeatureFlagOn)
505+
notificationsBadge.badgeCountWasUpdated(newValue: count, tab: tab, in: tabBar, tabIndex: tabIndex)
499506
}
500-
let tab = WooTab.hubMenu
501-
let tabIndex = tab.visibleIndex(isHubMenuFeatureFlagOn)
502-
notificationsBadge.badgeCountWasUpdated(newValue: count, tab: tab, in: tabBar, tabIndex: tabIndex)
503507
}
504508
}
505509

0 commit comments

Comments
 (0)