Fix gamelist refresh on leaving game

Game list update was skipped if the game list wasn't visible.  Fix up a
couple of cases when switching back to the game list the update was
called in the wrong order.
This commit is contained in:
Gavin Lambert 2013-06-10 22:48:03 +12:00
parent 014258fcf2
commit 467725641f
2 changed files with 3 additions and 2 deletions

View File

@ -137,8 +137,9 @@ cah.ajax.SuccessHandlers[cah.$.AjaxOperation.LEAVE_GAME] = function(data, req) {
game.dispose();
delete cah.currentGames[req[cah.$.AjaxRequest.GAME_ID]];
}
cah.GameList.instance.update();
cah.GameList.instance.show();
cah.GameList.instance.update();
};
cah.ajax.SuccessHandlers[cah.$.AjaxOperation.START_GAME] = function(data, req) {

View File

@ -191,8 +191,8 @@ cah.longpoll.EventHandlers[cah.$.LongPollEvent.KICKED_FROM_GAME_IDLE] = function
game.dispose();
delete cah.currentGames[data[cah.$.LongPollResponse.GAME_ID]];
}
cah.GameList.instance.update();
cah.GameList.instance.show();
cah.GameList.instance.update();
cah.log.error("You were kicked from game " + data[cah.$.LongPollResponse.GAME_ID]
+ " for being idle for too long.");