mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-11-22 16:23:50 +00:00
fix for lastIndex in reversing of pagination
This commit is contained in:
parent
864d0ffcc6
commit
899e6760e1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user