Highlight the current room in the recents list

This commit is contained in:
Emmanuel ROHEE 2014-08-27 17:20:41 +02:00
parent 7ee5288849
commit d9155b6a25
4 changed files with 16 additions and 2 deletions

View file

@ -20,7 +20,11 @@ angular.module('RecentsController', ['matrixService', 'eventHandlerService'])
.controller('RecentsController', ['$scope', 'matrixService', 'eventHandlerService', 'eventStreamService',
function($scope, matrixService, eventHandlerService, eventStreamService) {
$scope.rooms = {};
// $scope of the parent where the recents component is included can override this value
// in order to highlight a specific room in the list
$scope.recentsSelectedRoomID;
$scope.$on(eventHandlerService.MEMBER_EVENT, function(ngEvent, event, isLive) {
var config = matrixService.config();
if (event.state_key === config.user_id && event.content.membership === "invite") {