"With the new version you will be able to specify that the RoomList (and UserList too) should not be sorted. In this case the rooms will be displayed from top to bottom according to their creation order. " - Lapo 2007
Much water has past under the bridge since then and now I actually do want the room list sorted, or more specifically, to display in the order of creation as promised.
I have created 4 rooms. Lets call them T1, E1, E2, E3. I created them in that order and the room id verifies this with consecutive ids.
But, when I list them in a UITableView in iOS, I get T1, E3, E1, E2 - no matter what I do. This code is the same as sample code, but does not appear to work or the server is not doing what it should.
Code: Select all
SFSRoom *room = [[_smartFox.roomManager getRoomListFromGroup:@"Campus"] objectAtIndex:indexPath.row];
cell.textLabel.text = [NSString stringWithFormat:@"%@ (%d/%d)", room.name, room.userCount, room.maxUsers];
I know I can resort the array on the iphone and then redisplay in the correct order, but I was hoping that they would display in the order created.
Any ideas what I may be doing wrong or what I can change?
Thanks in advance
Paul.