Bodge to default to '1 users' when you create a room, which is better than blindly assuming a recents controller is writing to rootScope.rooms and setting numUsersInRoom there.

This commit is contained in:
Kegan Dougal 2014-09-08 14:01:34 -07:00
parent da9b7b0368
commit a3590dfa26
2 changed files with 6 additions and 1 deletions

View file

@ -82,6 +82,11 @@ angular.module('RecentsController', ['matrixService', 'matrixFilter', 'eventHand
eventHandlerService.waitForInitialSyncCompletion().then(
function(initialSyncData) {
// XXX FIXME TODO:
// Any assignments to the rootScope here should be done in
// event handler service and not here, because we could have
// many controllers manipulating and clobbering each other, and
// are unecessarily repeating http requests.
var rooms = initialSyncData.data.rooms;
for (var i=0; i<rooms.length; i++) {
var room = rooms[i];