remove fixing of last index due to solving that pages size must be saved in reversing of pagination

This commit is contained in:
InsanusMokrassar 2020-10-22 18:50:17 +06:00
parent 899e6760e1
commit 56cdd8d6af

View File

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