From d0c38973e62f4cc8e1c70787733985f0951b25ff Mon Sep 17 00:00:00 2001 From: buddh4 Date: Tue, 21 Feb 2017 21:23:01 +0100 Subject: [PATCH] Fix: Hide notification count badge if notification count is 0 --- protected/humhub/docs/CHANGELOG.md | 2 +- .../modules/notification/resources/js/humhub.notification.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/protected/humhub/docs/CHANGELOG.md b/protected/humhub/docs/CHANGELOG.md index 054f0e3b06..672d045cc7 100644 --- a/protected/humhub/docs/CHANGELOG.md +++ b/protected/humhub/docs/CHANGELOG.md @@ -47,7 +47,7 @@ HumHub Change Log - Fix: Activity stream rendering issue on page unload. - Enh: Optimized stream entry fade animation. - Enh: Added $maxAttachedFiles to content module to restrict the uploaded file count of comments and posts - +- Fix: Hide notification count badge if notification count is 0 1.2.0-beta.1 (February 08, 2017) diff --git a/protected/humhub/modules/notification/resources/js/humhub.notification.js b/protected/humhub/modules/notification/resources/js/humhub.notification.js index c8454202f2..1c17e2643b 100644 --- a/protected/humhub/modules/notification/resources/js/humhub.notification.js +++ b/protected/humhub/modules/notification/resources/js/humhub.notification.js @@ -102,10 +102,14 @@ humhub.module('notification', function (module, require, $) { NotificationDropDown.prototype.updateCount = function ($count) { if (this.$.data('notification-count') === $count) { + if(!$count) { + $('#badge-notifications').hide(); + } return; } $('#badge-notifications').hide(); + if (!$count) { updateTitle(false); $('#badge-notifications').html('0');