Assume all servers support rooms

The rooms feature was pushed out over two years ago, so we're dropping
support for non-rooms-supporting servers. Even for one-room servers,
the rooms tab includes a user count and a battle count.

This smoothes out preloading on the main server.
This commit is contained in:
Guangcong Luo 2015-10-05 16:28:46 -04:00
parent de5474dceb
commit 424c455272

View File

@ -1272,7 +1272,6 @@
});
},
roomsResponse: function (data) {
app.supports['rooms'] = true;
if (data) {
this.roomsData = data;
}
@ -1820,9 +1819,7 @@
if (window.nodewebkit) {
if (nwWindow.setBadgeLabel) nwWindow.setBadgeLabel(notificationCount || '');
}
if (app.supports['rooms']) {
sideBuf += '<li><a class="button' + (curId === 'rooms' || curSideId === 'rooms' ? ' cur' : '') + '" href="' + app.root + 'rooms"><i class="fa fa-plus" style="margin:7px auto -6px auto"></i> <span>&nbsp;</span></a></li>';
}
sideBuf += '<li><a class="button' + (curId === 'rooms' || curSideId === 'rooms' ? ' cur' : '') + '" href="' + app.root + 'rooms"><i class="fa fa-plus" style="margin:7px auto -6px auto"></i> <span>&nbsp;</span></a></li>';
var margin = 0;
if (sideBuf) {
if (app.curSideRoom) {
@ -2937,9 +2934,7 @@
var buf = '<ul>' + this.renderRooms([app.rooms[''], app.rooms['teambuilder'], app.rooms['ladder']]) + '</ul>';
if (app.roomList.length) buf += this.renderRooms(app.roomList);
var sideBuf = this.renderRooms(app.sideRoomList);
if (app.supports['rooms']) {
sideBuf += '<li><a class="button' + (curId === 'rooms' || curSideId === 'rooms' ? ' cur' : '') + '" href="' + app.root + 'rooms"><i class="fa fa-plus"></i> <span>&nbsp;</span></a></li>';
}
sideBuf += '<li><a class="button' + (curId === 'rooms' || curSideId === 'rooms' ? ' cur' : '') + '" href="' + app.root + 'rooms"><i class="fa fa-plus"></i> <span>&nbsp;</span></a></li>';
if (sideBuf) {
buf += '<ul>' + sideBuf + '</ul>';
}