diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-11-12 15:31:06 +0000 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-11-12 15:31:06 +0000 |
commit | 960b28c90a6ca8b9c61a3b376b4f9223203f4f06 (patch) | |
tree | 43b2c56407d38515e6bcaee5f679ea928520c46d /syweb/webclient/recents/recents-controller.js | |
parent | Migrate unread messages logic to recentsService. (diff) | |
download | synapse-960b28c90a6ca8b9c61a3b376b4f9223203f4f06.tar.xz |
SYWEB-57: Highlight rooms which have had their bingers go off in blue.
Priority is the same as xchat so selected > blue > red.
Diffstat (limited to 'syweb/webclient/recents/recents-controller.js')
-rw-r--r-- | syweb/webclient/recents/recents-controller.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/syweb/webclient/recents/recents-controller.js b/syweb/webclient/recents/recents-controller.js index 5c2cf270c3..41720d4cb0 100644 --- a/syweb/webclient/recents/recents-controller.js +++ b/syweb/webclient/recents/recents-controller.js @@ -38,6 +38,12 @@ angular.module('RecentsController', ['matrixService', 'matrixFilter']) $scope.unreadMessages = recentsService.getUnreadMessages(); }); + // track the list of unread BING messages: the html will use this + $scope.unreadBings = recentsService.getUnreadBingMessages(); + $scope.$on(recentsService.BROADCAST_UNREAD_BING_MESSAGES, function(ngEvent, room_id, event) { + $scope.unreadBings = recentsService.getUnreadBingMessages(); + }); + $scope.selectRoom = function(room) { recentsService.markAsRead(room.room_id); $rootScope.goToPage('room/' + (room.room_alias ? room.room_alias : room.room_id) ); |