Switch to count of all notifications

This commit is contained in:
riking 2014-09-09 20:13:36 -07:00
parent 5dfd3fc8eb
commit 637371e60a
2 changed files with 5 additions and 5 deletions

View File

@ -28,7 +28,7 @@
{{#link-to 'user.notifications'}}
<i class='glyph fa fa-comment'></i>
{{i18n user.notifications}}
<span class='count'>({{unread_notification_count}})</span>
<span class='count'>({{notification_count}})</span>
<span class='fa fa-chevron-right'></span>
{{/link-to}}
{{/link-to}}

View File

@ -43,7 +43,7 @@ class UserSerializer < BasicUserSerializer
:suspended_till,
:uploaded_avatar_id,
:badge_count,
:unread_notification_count,
:notification_count,
:has_title_badges,
:edit_history_public,
:custom_fields
@ -77,7 +77,7 @@ class UserSerializer < BasicUserSerializer
:tracked_category_ids,
:watched_category_ids,
:private_messages_stats,
:unread_notification_count,
:notification_count,
:disable_jump_reply,
:gravatar_avatar_upload_id,
:custom_avatar_upload_id,
@ -244,8 +244,8 @@ class UserSerializer < BasicUserSerializer
object.badges.where(allow_title: true).count > 0
end
def unread_notification_count
Notification.where(user_id: object.id, read: false).count
def notification_count
Notification.where(user_id: object.id).count
end
def include_edit_history_public?