From d86bf2bf9dbb9b4d7980949a5a35af4888de053f Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sun, 8 Aug 2021 00:23:47 +0200 Subject: [PATCH] Use notification_count helper to get notification count for icon badge --- app/views/navigation/_mobile.haml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/views/navigation/_mobile.haml b/app/views/navigation/_mobile.haml index 715f5e8b..d4df084d 100644 --- a/app/views/navigation/_mobile.haml +++ b/app/views/navigation/_mobile.haml @@ -1,8 +1,5 @@ = render 'navigation/mobile/profile' -:ruby - notification_count = Notification.for(current_user).where(new: true).count - notification_count = nil if notification_count.zero? - notifications_icon = notification_count.nil? ? 'bell-o' : 'bell' +- notifications_icon = notification_count.nil? ? 'bell-o' : 'bell' %nav.navbar.navbar-themed.bg-primary.fixed-bottom.d-lg-none.d-block#rs-mobile-nav{ role: :navigation } .container{ class: ios_web_app? ? 'ios-web-app' : '' } %ul.nav.navbar-nav.navbar-icon-row