From 5e716fb9a81e8fe5c93874fa44ac53858bdb1f7a Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 2 Jul 2022 02:26:58 +0600 Subject: [PATCH 1/2] start 0.11.12 --- CHANGELOG.md | 2 ++ gradle.properties | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 543f7913225..ac8d1fecfa3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog +## 0.11.12 + ## 0.11.11 * `Crypto`: diff --git a/gradle.properties b/gradle.properties index 84fec20a63e..103c83c8a17 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,5 +14,5 @@ crypto_js_version=4.1.1 # Project data group=dev.inmo -version=0.11.11 -android_code_version=135 +version=0.11.12 +android_code_version=136 From a3a48bbaacc3260d169956c51170a9369b090663 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sat, 2 Jul 2022 02:28:43 +0600 Subject: [PATCH 2/2] fixes in file key value repo --- CHANGELOG.md | 5 +++++ .../kotlin/dev/inmo/micro_utils/repos/FileKeyValueRepo.kt | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac8d1fecfa3..591639e8deb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## 0.11.12 +* `Repos`: + * `Common`: + * `JVM`: + * Fixes in `ReadFileKeyValueRepo` methods (`values`/`keys`) + ## 0.11.11 * `Crypto`: diff --git a/repos/common/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/FileKeyValueRepo.kt b/repos/common/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/FileKeyValueRepo.kt index 5c7fb0121b3..c35376242d3 100644 --- a/repos/common/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/FileKeyValueRepo.kt +++ b/repos/common/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/FileKeyValueRepo.kt @@ -34,7 +34,7 @@ class FileReadKeyValueRepo( override suspend fun values(pagination: Pagination, reversed: Boolean): PaginationResult { val count = count() val resultPagination = if (reversed) pagination.reverse(count) else pagination - val filesPaths = folder.list() ?.copyOfRange(resultPagination.firstIndex, resultPagination.lastIndex) ?: return emptyPaginationResult() + val filesPaths = folder.list() ?.copyOfRange(resultPagination.firstIndex, resultPagination.lastIndexExclusive) ?: return emptyPaginationResult() if (reversed) { filesPaths.reverse() } @@ -47,7 +47,7 @@ class FileReadKeyValueRepo( override suspend fun keys(pagination: Pagination, reversed: Boolean): PaginationResult { val count = count() val resultPagination = if (reversed) pagination.reverse(count) else pagination - val filesPaths = folder.list() ?.copyOfRange(resultPagination.firstIndex, resultPagination.lastIndex) ?: return emptyPaginationResult() + val filesPaths = folder.list() ?.copyOfRange(resultPagination.firstIndex, resultPagination.lastIndexExclusive) ?: return emptyPaginationResult() if (reversed) { filesPaths.reverse() }