Skip to content

Commit

Permalink
* UI: fixed error in card viewer while viewing pages with tokens;
Browse files Browse the repository at this point in the history
  • Loading branch information
JayDi85 committed Sep 27, 2019
1 parent 3877d22 commit a74fb36
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -695,13 +695,13 @@ private List<Plane> getPlanes(int page, String set, int numTokensEmblems) {
int totalTokensEmblems = totalTokens + getTotalNumEmblems(set);
int start = 0;
if (!(page * conf.CARDS_PER_PAGE <= totalTokensEmblems && (page + 1) * conf.CARDS_PER_PAGE >= totalTokensEmblems)) {
start = page * conf.CARDS_PER_PAGE - totalTokensEmblems;
start = Math.max(0, page * conf.CARDS_PER_PAGE - totalTokensEmblems);
pageRight.setVisible(true);
}

int end = planes.size();
if ((page + 1) * conf.CARDS_PER_PAGE < totalTokensEmblems + planes.size()) {
end = (page + 1) * conf.CARDS_PER_PAGE - totalTokensEmblems;
end = Math.max(0, (page + 1) * conf.CARDS_PER_PAGE - totalTokensEmblems);
pageRight.setVisible(true);
} else {
pageRight.setVisible(false);
Expand Down

0 comments on commit a74fb36

Please sign in to comment.