Skip to content

Commit 9bcb751

Browse files
fix: list pref can't scroll
1 parent 8afbf26 commit 9bcb751

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

android/src/main/kotlin/project/pipepipe/app/ui/component/PreferenceComponents.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ import androidx.compose.foundation.background
44
import androidx.compose.foundation.border
55
import androidx.compose.foundation.clickable
66
import androidx.compose.foundation.layout.*
7+
import androidx.compose.foundation.rememberScrollState
78
import androidx.compose.foundation.shape.CircleShape
89
import androidx.compose.foundation.text.KeyboardOptions
10+
import androidx.compose.foundation.verticalScroll
911
import androidx.compose.material3.*
1012
import androidx.compose.runtime.*
1113
import androidx.compose.ui.Alignment
@@ -89,7 +91,7 @@ fun ListPreference(
8991
onDismissRequest = { showDialog = false },
9092
title = { Text(item.title) },
9193
text = {
92-
Column {
94+
Column(modifier = Modifier.verticalScroll(rememberScrollState())) {
9395
item.entries.forEachIndexed { index, entry ->
9496
Row(
9597
modifier = Modifier
@@ -151,7 +153,7 @@ fun IntListPreference(
151153
onDismissRequest = { showDialog = false },
152154
title = { Text(item.title) },
153155
text = {
154-
Column {
156+
Column(modifier = Modifier.verticalScroll(rememberScrollState())) {
155157
item.entries.forEachIndexed { index, entry ->
156158
Row(
157159
modifier = Modifier
@@ -392,7 +394,7 @@ fun MultiSelectPreference(
392394
onDismissRequest = { showDialog = false },
393395
title = { Text(item.title) },
394396
text = {
395-
Column {
397+
Column(modifier = Modifier.verticalScroll(rememberScrollState())) {
396398
item.entries.forEachIndexed { index, entry ->
397399
val value = item.entryValues.getOrNull(index) ?: return@forEachIndexed
398400
val isChecked = dialogSelection.contains(value)

0 commit comments

Comments
 (0)