fix for lastIndex in reversing of pagination

This commit is contained in:
InsanusMokrassar 2020-10-22 18:48:05 +06:00
parent 864d0ffcc6
commit 899e6760e1
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ fun Pagination.reverse(datasetSize: Long): SimplePagination {
newPage,
size
).let {
if (it.lastIndex > datasetSize) {
if (it.lastIndex >= datasetSize) {
it.copy(size = (datasetSize - firstIndex - 1).toInt())
} else {
it