Use immutable collections in more places
This commit is contained in:
@@ -34,6 +34,8 @@ import androidx.compose.ui.tooling.preview.PreviewLightDark
|
||||
import androidx.compose.ui.unit.dp
|
||||
import eu.kanade.presentation.theme.TachiyomiTheme
|
||||
import eu.kanade.tachiyomi.R
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
import kotlinx.collections.immutable.toImmutableList
|
||||
import tachiyomi.presentation.core.components.ScrollbarLazyColumn
|
||||
import tachiyomi.presentation.core.components.WheelNumberPicker
|
||||
import tachiyomi.presentation.core.components.WheelTextPicker
|
||||
@@ -102,7 +104,7 @@ fun TrackChapterSelector(
|
||||
title = stringResource(R.string.chapters),
|
||||
content = {
|
||||
WheelNumberPicker(
|
||||
items = range.toList(),
|
||||
items = range.toImmutableList(),
|
||||
modifier = Modifier.align(Alignment.Center),
|
||||
startIndex = selection,
|
||||
onSelectionChanged = { onSelectionChange(it) },
|
||||
@@ -117,7 +119,7 @@ fun TrackChapterSelector(
|
||||
fun TrackScoreSelector(
|
||||
selection: String,
|
||||
onSelectionChange: (String) -> Unit,
|
||||
selections: List<String>,
|
||||
selections: ImmutableList<String>,
|
||||
onConfirm: () -> Unit,
|
||||
onDismissRequest: () -> Unit,
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user