From 52e4e6b80223eb6b1dc7eff8afda35b38bf6a128 Mon Sep 17 00:00:00 2001 From: Koitharu Date: Wed, 31 Jan 2024 15:04:00 +0200 Subject: [PATCH] Update collections library --- build.gradle | 2 +- src/main/kotlin/org/koitharu/kotatsu/parsers/util/String.kt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 109ad622..c5412694 100644 --- a/build.gradle +++ b/build.gradle @@ -58,7 +58,7 @@ dependencies { implementation 'com.squareup.okio:okio:3.7.0' api 'org.jsoup:jsoup:1.17.2' implementation 'org.json:json:20231013' - implementation 'androidx.collection:collection-ktx:1.3.0' + implementation 'androidx.collection:collection:1.4.0' ksp project(':kotatsu-parsers-ksp') diff --git a/src/main/kotlin/org/koitharu/kotatsu/parsers/util/String.kt b/src/main/kotlin/org/koitharu/kotatsu/parsers/util/String.kt index 94baf822..bdc23418 100644 --- a/src/main/kotlin/org/koitharu/kotatsu/parsers/util/String.kt +++ b/src/main/kotlin/org/koitharu/kotatsu/parsers/util/String.kt @@ -3,6 +3,7 @@ package org.koitharu.kotatsu.parsers.util import androidx.annotation.FloatRange +import androidx.collection.MutableIntList import androidx.collection.arraySetOf import java.math.BigInteger import java.net.URLDecoder @@ -84,7 +85,7 @@ fun String.ellipsize(maxLength: Int) = if (this.length > maxLength) { } else this fun String.splitTwoParts(delimiter: Char): Pair? { - val indices = ArrayList(4) + val indices = MutableIntList(4) for ((i, c) in this.withIndex()) { if (c == delimiter) { indices += i