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:
parent
da9b7b0368
commit
a3590dfa26
|
@ -82,6 +82,11 @@ angular.module('RecentsController', ['matrixService', 'matrixFilter', 'eventHand
|
||||||
eventHandlerService.waitForInitialSyncCompletion().then(
|
eventHandlerService.waitForInitialSyncCompletion().then(
|
||||||
function(initialSyncData) {
|
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;
|
var rooms = initialSyncData.data.rooms;
|
||||||
for (var i=0; i<rooms.length; i++) {
|
for (var i=0; i<rooms.length; i++) {
|
||||||
var room = rooms[i];
|
var room = rooms[i];
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
{{ room.room_id | mRoomName }}
|
{{ room.room_id | mRoomName }}
|
||||||
</td>
|
</td>
|
||||||
<td class="recentsRoomSummaryTS">
|
<td class="recentsRoomSummaryTS">
|
||||||
{{ room.numUsersInRoom }} {{ room.numUsersInRoom == 1 ? 'user' : 'users' }}
|
{{ room.numUsersInRoom || '1' }} {{ room.numUsersInRoom == 1 ? 'user' : 'users' }}
|
||||||
</td>
|
</td>
|
||||||
<td class="recentsRoomSummaryTS">
|
<td class="recentsRoomSummaryTS">
|
||||||
{{ (room.lastMsg.ts) | date:'MMM d HH:mm' }}
|
{{ (room.lastMsg.ts) | date:'MMM d HH:mm' }}
|
||||||
|
|
Loading…
Reference in New Issue