diff --git a/pagination/common/src/commonMain/kotlin/dev/inmo/micro_utils/pagination/utils/PaginationReversing.kt b/pagination/common/src/commonMain/kotlin/dev/inmo/micro_utils/pagination/utils/PaginationReversing.kt index 07104445e8c..b2761565296 100644 --- a/pagination/common/src/commonMain/kotlin/dev/inmo/micro_utils/pagination/utils/PaginationReversing.kt +++ b/pagination/common/src/commonMain/kotlin/dev/inmo/micro_utils/pagination/utils/PaginationReversing.kt @@ -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 - } - } + ) } }