Use notification_count helper to get notification count for icon badge

This commit is contained in:
Karina Kwiatek 2021-08-08 00:23:47 +02:00
parent 38bd282b38
commit d86bf2bf9d
1 changed files with 1 additions and 4 deletions

View File

@ -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