summaryrefslogtreecommitdiffstats
path: root/js/public/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/public/app.js')
-rw-r--r--js/public/app.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/js/public/app.js b/js/public/app.js
index ced24417e..91a50de34 100644
--- a/js/public/app.js
+++ b/js/public/app.js
@@ -436,14 +436,17 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
this._$scope.starredBusinessLayer = this._starredBusinessLayer;
this._$scope.unreadCountFormatter = this._unreadCountFormatter;
this._$scope.getTotalUnreadCount = function() {
- var count, titleCount;
+ var count, title, titleCount;
count = _this._subscriptionsBusinessLayer.getUnreadCount(0);
if (count > 0) {
titleCount = _this._unreadCountFormatter(count);
- _this._$window.document.title = 'News (' + titleCount + ') | ownCloud';
+ title = 'News (' + titleCount + ') | ownCloud';
} else {
- _this._$window.document.title = 'News | ownCloud';
+ title = 'News | ownCloud';
+ }
+ if (_this._$window.document.title !== title) {
+ _this._$window.document.title = title;
}
return count;
};