Skip to content

Commit

Permalink
Remove redundant rank refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoshxxu committed Sep 24, 2014
1 parent 86197e8 commit c0f84e6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/webapp/javascript/viewContest.js
Expand Up @@ -643,7 +643,7 @@ function updateRankInfo() {
now - lastClickTime > 300000 ? 99999999 :
hash && hash[0] == "#rank" ? 10000 : 60000;

var rankUpdateCountDown =
var rankUpdateCountDown = ti[1] >= ti[0] ? 0 :
Math.round(
(lastRankUpdateTime - ti[1] + startTime + updateInterval - now) / 1000
);
Expand Down Expand Up @@ -1090,9 +1090,11 @@ function resetTimeSlider () {
window.location.reload();
}
updateRankInfo();
}
};
temp();
sliderUpdater = setInterval(temp, 1000);
if (ti[1] < ti[0]) {
sliderUpdater = setInterval(temp, 1000);
}
};

function isScrolledIntoView(elem) {
Expand Down

0 comments on commit c0f84e6

Please sign in to comment.