Fix pager crashing on the last page (Closes #5)

This commit is contained in:
Syer10
2021-06-07 14:14:25 -04:00
parent f9a0fcd22c
commit f4f565dc91

View File

@@ -47,7 +47,9 @@ fun PagerReader(
MoveTo.Previous -> currentPage - 1
MoveTo.Next -> currentPage + 1
}
state.animateScrollToPage(page)
if (page <= pages.size) {
state.animateScrollToPage(page)
}
}
.launchIn(this)
}