diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c92ee051393adf8bcdff7cb3402ced9eecea12dc..c2a9e2cfa662e0705c27ac709003883aae431b54 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -25,6 +25,7 @@ Fixed * The icons in the account menu were still the old ones. * Due to a merge error, the once removed account menu in the sidenav appeared again. * Scheduled notifications were shown on dashboard before time. +* Remove broken notifications menu item in favor of item next to account menu. Changed ~~~~~~~ diff --git a/aleksis/core/menus.py b/aleksis/core/menus.py index 58ffe5bcc421b738b367c0e04de76cf83fc2737f..49ddd4af743769252cbdbbae26d7de1d68c55776 100644 --- a/aleksis/core/menus.py +++ b/aleksis/core/menus.py @@ -1,8 +1,6 @@ from django.conf import settings from django.utils.translation import gettext_lazy as _ -from .util.core_helpers import unread_notifications_badge - MENUS = { "NAV_MENU_CORE": [ { @@ -37,18 +35,6 @@ MENUS = { ("aleksis.core.util.predicates.permission_validator", "core.view_dashboard_rule") ], }, - { - "name": _("Notifications"), - "url": "notifications", - "svg_icon": "mdi:bell-outline", - "badge": unread_notifications_badge, - "validators": [ - ( - "aleksis.core.util.predicates.permission_validator", - "core.view_notifications_rule", - ), - ], - }, { "name": _("Admin"), "url": "#", diff --git a/aleksis/core/util/core_helpers.py b/aleksis/core/util/core_helpers.py index 6c9e0f10f0009f4a435c07e7f332605fda7a3e85..ffdba5f45c55454489c8b21c81688458c9808163 100644 --- a/aleksis/core/util/core_helpers.py +++ b/aleksis/core/util/core_helpers.py @@ -321,11 +321,6 @@ def generate_random_code(length, packet_size) -> str: return get_random_string(packet_size * length).lower() -def unread_notifications_badge(request: HttpRequest) -> int: - """Generate badge content with the number of unread notifications.""" - return request.user.person.unread_notifications_count - - def monkey_patch() -> None: # noqa """Monkey-patch dependencies for special behaviour.""" # Unwrap promises in JSON serializer instead of stringifying