|
@@ -566,10 +566,10 @@ public class CPDFViewCtrl extends ConstraintLayout implements IReaderViewCallbac
|
|
|
indicatorView.setTotalPage(totalPageCount);
|
|
|
indicatorView.setCurrentPageIndex(0);
|
|
|
indicatorView.setPageIndicatorClickListener(pageIndex -> {
|
|
|
- CGotoPageDialog dialog = CGotoPageDialog.newInstance((getContext().getString(R.string.tools_page) + String.format(" (%d/%d)", 1, totalPageCount)));
|
|
|
- dialog.setPageCount(totalPageCount);
|
|
|
+ CGotoPageDialog dialog = CGotoPageDialog.newInstance((getContext().getString(R.string.tools_page) + String.format(" (%d/%d)", 1, cPdfReaderView.getPDFDocument().getPageCount())));
|
|
|
+ dialog.setPageCount(cPdfReaderView.getPDFDocument().getPageCount());
|
|
|
dialog.setOnPDFDisplayPageIndexListener(page -> {
|
|
|
- if (page <= totalPageCount && page > 0) {
|
|
|
+ if (page <= cPdfReaderView.getPDFDocument().getPageCount() && page > 0) {
|
|
|
cPdfReaderView.setDisplayPageIndex(page - 1, true);
|
|
|
}
|
|
|
});
|