Skip the menu indicator on mobile if only sub level items have counters
authorMarcel Werk <burntime@woltlab.com>
Sun, 9 Aug 2020 12:02:34 +0000 (14:02 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sun, 9 Aug 2020 12:02:34 +0000 (14:02 +0200)
Closes #3164

wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/Abstract.js

index e07e7d37ad3eccb3645fd5dd2633064ee307c517..9418ee8c963c5bb9bb2f5cba63b000b28fe29e31 100644 (file)
@@ -550,8 +550,9 @@ define(['Core', 'Environment', 'EventHandler', 'Language', 'ObjectMap', 'Dom/Tra
                
                _updateButtonState: function() {
                        var hasNewContent = false;
+                       var itemList = elBySel('.menuOverlayItemList', this._menu);
                        elBySelAll('.badgeUpdate', this._menu, function (badge) {
-                               if (~~badge.textContent > 0) {
+                               if (~~badge.textContent > 0 && badge.closest('.menuOverlayItemList') === itemList) {
                                        hasNewContent = true;
                                }
                        });