From 030f3e2ccd02a2786bba701d4b82cd2076de8133 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Tue, 7 May 2013 10:43:54 +0200 Subject: dont highlight tab title when nothing changed, fix #157 --- js/app/controllers/feedcontroller.coffee | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'js/app') diff --git a/js/app/controllers/feedcontroller.coffee b/js/app/controllers/feedcontroller.coffee index 41e4fa07d..43488ddba 100644 --- a/js/app/controllers/feedcontroller.coffee +++ b/js/app/controllers/feedcontroller.coffee @@ -56,10 +56,15 @@ ActiveFeed, FeedType, $window) -> # and it has nothing to do with the body structure if count > 0 titleCount = @_unreadCountFormatter(count) - @_$window.document.title = - 'News (' + titleCount + ') | ownCloud' + title = 'News (' + titleCount + ') | ownCloud' else - @_$window.document.title = 'News | ownCloud' + title = 'News | ownCloud' + + # only update title when it changed to prevent highlighting the + # tab + if @_$window.document.title != title + @_$window.document.title = title + return count @_$scope.isAddingFolder = => -- cgit v1.2.3