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:
parent
014258fcf2
commit
467725641f
|
@ -137,8 +137,9 @@ cah.ajax.SuccessHandlers[cah.$.AjaxOperation.LEAVE_GAME] = function(data, req) {
|
||||||
game.dispose();
|
game.dispose();
|
||||||
delete cah.currentGames[req[cah.$.AjaxRequest.GAME_ID]];
|
delete cah.currentGames[req[cah.$.AjaxRequest.GAME_ID]];
|
||||||
}
|
}
|
||||||
cah.GameList.instance.update();
|
|
||||||
cah.GameList.instance.show();
|
cah.GameList.instance.show();
|
||||||
|
cah.GameList.instance.update();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
cah.ajax.SuccessHandlers[cah.$.AjaxOperation.START_GAME] = function(data, req) {
|
cah.ajax.SuccessHandlers[cah.$.AjaxOperation.START_GAME] = function(data, req) {
|
||||||
|
|
|
@ -191,8 +191,8 @@ cah.longpoll.EventHandlers[cah.$.LongPollEvent.KICKED_FROM_GAME_IDLE] = function
|
||||||
game.dispose();
|
game.dispose();
|
||||||
delete cah.currentGames[data[cah.$.LongPollResponse.GAME_ID]];
|
delete cah.currentGames[data[cah.$.LongPollResponse.GAME_ID]];
|
||||||
}
|
}
|
||||||
cah.GameList.instance.update();
|
|
||||||
cah.GameList.instance.show();
|
cah.GameList.instance.show();
|
||||||
|
cah.GameList.instance.update();
|
||||||
|
|
||||||
cah.log.error("You were kicked from game " + data[cah.$.LongPollResponse.GAME_ID]
|
cah.log.error("You were kicked from game " + data[cah.$.LongPollResponse.GAME_ID]
|
||||||
+ " for being idle for too long.");
|
+ " for being idle for too long.");
|
||||||
|
|
Loading…
Reference in New Issue