From 663e7ad074541ca2232c4e92f3288fb8905faa60 Mon Sep 17 00:00:00 2001 From: Thibault Duplessis Date: Mon, 5 Oct 2015 11:31:57 +0200 Subject: [PATCH] tweak arena redraw --- ui/tournament/src/ctrl.js | 3 ++- ui/tournament/src/view/arena.js | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/tournament/src/ctrl.js b/ui/tournament/src/ctrl.js index e21c10626a..18e861d694 100644 --- a/ui/tournament/src/ctrl.js +++ b/ui/tournament/src/ctrl.js @@ -49,7 +49,7 @@ module.exports = function(env) { this.loadPage(this.data.standing); var setPage = function(page) { - m.redraw.strategy('all'); + // m.redraw.strategy('all'); this.vm.page = page; xhr.loadPage(this, page) }.bind(this); @@ -106,6 +106,7 @@ module.exports = function(env) { data: null }; if (this.vm.playerInfo.id) xhr.playerInfo(this, this.vm.playerInfo.id); + m.redraw(); }.bind(this); this.setPlayerInfoData = function(data) { diff --git a/ui/tournament/src/view/arena.js b/ui/tournament/src/view/arena.js index ce18a03e14..de9b6038fe 100644 --- a/ui/tournament/src/view/arena.js +++ b/ui/tournament/src/view/arena.js @@ -127,7 +127,12 @@ module.exports = { button.joinWithdraw(ctrl) ]) ])), - m('tbody', pag.currentPageResults.map(partial(playerTr, ctrl))) + m('tbody', { + config: function() { + // reload user badges + $('body').trigger('lichess.content_loaded'); + } + }, pag.currentPageResults.map(partial(playerTr, ctrl))) ]; } };