From a631a913c7f019ba2c9fd210ff99ffbf2326c0ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Sat, 28 Nov 2015 21:25:06 +0100 Subject: [PATCH] Fix initialisation of global unread count Fixes #595 --- js/glowingbear.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/glowingbear.js b/js/glowingbear.js index 0c209c3..3e3a2e2 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -214,8 +214,10 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', ); } notifications.updateTitle(ab); - $scope.notifications = notifications.unreadCount('notification'); - $scope.unread = notifications.unreadCount('unread'); + setTimeout(function(){ + $scope.notifications = notifications.unreadCount('notification'); + $scope.unread = notifications.unreadCount('unread'); + }); $timeout(function() { $rootScope.scrollWithBuffer(true);