Drop kotlinx-collections-immutable usage (#3380)

This commit is contained in:
AntsyLich
2026-06-04 02:45:24 +06:00
committed by GitHub
parent 7f8851de6a
commit cd27b10750
91 changed files with 317 additions and 523 deletions
-1
View File
@@ -40,5 +40,4 @@ dependencies {
implementation(libs.androidx.paging.runtime)
implementation(libs.androidx.paging.compose)
implementation(libs.kotlinx.collections.immutable)
}
@@ -21,7 +21,6 @@ import androidx.compose.ui.text.PlaceholderVerticalAlign
import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import kotlinx.collections.immutable.persistentMapOf
@Composable
fun BadgeGroup(
@@ -67,7 +66,7 @@ fun Badge(
val text = buildAnnotatedString {
appendInlineContent(iconContentPlaceholder)
}
val inlineContent = persistentMapOf(
val inlineContent = mapOf(
Pair(
iconContentPlaceholder,
InlineTextContent(
@@ -43,7 +43,6 @@ import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.DpSize
import androidx.compose.ui.unit.dp
import kotlinx.collections.immutable.ImmutableList
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.map
@@ -56,7 +55,7 @@ import kotlin.math.absoluteValue
@Composable
fun WheelNumberPicker(
items: ImmutableList<Number>,
items: List<Number>,
modifier: Modifier = Modifier,
startIndex: Int = 0,
size: DpSize = DpSize(128.dp, 128.dp),
@@ -80,7 +79,7 @@ fun WheelNumberPicker(
@Composable
fun WheelTextPicker(
items: ImmutableList<String>,
items: List<String>,
modifier: Modifier = Modifier,
startIndex: Int = 0,
size: DpSize = DpSize(128.dp, 128.dp),
@@ -103,7 +102,7 @@ fun WheelTextPicker(
@Composable
private fun <T> WheelPicker(
items: ImmutableList<T>,
items: List<T>,
modifier: Modifier = Modifier,
startIndex: Int = 0,
size: DpSize = DpSize(128.dp, 128.dp),
@@ -22,7 +22,6 @@ import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.unit.dp
import androidx.compose.ui.util.fastForEach
import dev.icerock.moko.resources.StringResource
import kotlinx.collections.immutable.ImmutableList
import tachiyomi.presentation.core.components.ActionButton
import tachiyomi.presentation.core.components.material.padding
import tachiyomi.presentation.core.i18n.stringResource
@@ -39,7 +38,7 @@ data class EmptyScreenAction(
fun EmptyScreen(
stringRes: StringResource,
modifier: Modifier = Modifier,
actions: ImmutableList<EmptyScreenAction>? = null,
actions: List<EmptyScreenAction>? = null,
) {
EmptyScreen(
message = stringResource(stringRes),
@@ -52,7 +51,7 @@ fun EmptyScreen(
fun EmptyScreen(
message: String,
modifier: Modifier = Modifier,
actions: ImmutableList<EmptyScreenAction>? = null,
actions: List<EmptyScreenAction>? = null,
) {
val face = remember { getRandomErrorFace() }
Column(