Clean data when user logs out

This commit is contained in:
Emmanuel ROHEE 2014-09-12 17:43:25 +02:00
parent cc2cee4af6
commit 3ed39ad20e
4 changed files with 36 additions and 11 deletions

View file

@ -102,7 +102,7 @@ angular.module('RecentsController', ['matrixService', 'matrixFilter', 'eventHand
}
return memberCount;
}
};
$scope.onInit = function() {
// Init recents list only once
@ -139,6 +139,11 @@ angular.module('RecentsController', ['matrixService', 'matrixFilter', 'eventHand
}
);
};
// Clean data when user logs out
$scope.$on(eventHandlerService.RESET_EVENT, function() {
delete $rootScope.rooms;
});
}]);