mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-11-22 16:23:50 +00:00
remove fixing of last index due to solving that pages size must be saved in reversing of pagination
This commit is contained in:
parent
899e6760e1
commit
56cdd8d6af
@ -18,13 +18,7 @@ fun Pagination.reverse(datasetSize: Long): SimplePagination {
|
||||
else -> Pagination(
|
||||
newPage,
|
||||
size
|
||||
).let {
|
||||
if (it.lastIndex >= datasetSize) {
|
||||
it.copy(size = (datasetSize - firstIndex - 1).toInt())
|
||||
} else {
|
||||
it
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user