Skip to content
This repository has been archived by the owner on Feb 11, 2023. It is now read-only.

Commit

Permalink
[F] 修复分页问题
Browse files Browse the repository at this point in the history
  • Loading branch information
hykilpikonna committed Oct 4, 2018
1 parent be89e2a commit 2397237
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ public File render(Group group, IcqHttpApi api, int mode, int page) throws IOExc
ArrayList<UserData> userDataListThisPage = new ArrayList<>();

// 分页
int maxPage = userDataList.size() / entriesPerPage;
if (maxPage < 1) maxPage = 1;
// 20/20+1 = 2, 20/21+1 = 1
int maxPage = userDataList.size() / (entriesPerPage + 1) + 1;
if (page < 1) page = 1;
if (page > maxPage) page = maxPage;
int pageEndingEntry = page * entriesPerPage;
Expand Down

0 comments on commit 2397237

Please sign in to comment.