mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-11-29 21:48:45 +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,
|
newPage,
|
||||||
size
|
size
|
||||||
).let {
|
).let {
|
||||||
if (it.lastIndex > datasetSize) {
|
if (it.lastIndex >= datasetSize) {
|
||||||
it.copy(size = (datasetSize - firstIndex - 1).toInt())
|
it.copy(size = (datasetSize - firstIndex - 1).toInt())
|
||||||
} else {
|
} else {
|
||||||
it
|
it
|
||||||
|
Loading…
Reference in New Issue
Block a user