From 8b120438b1528e499ea8ea73bff1f850d35ddc62 Mon Sep 17 00:00:00 2001 From: Luqman Fadlli <75630095+luqmanfadlli@users.noreply.github.com> Date: Sat, 23 May 2026 18:57:29 +0700 Subject: [PATCH] feat: make language selection bottom sheet scrollable - Refactored `AppearanceLanguageBottomSheet` in `AppearanceSettingsPage.kt` to use a `LazyColumn` instead of a standard `Column`. - Wrapped the sheet title inside an `item` block and used `itemsIndexed` to render the language options. - This resolves an issue where the language list was truncated and unscrollable, particularly in landscape mode or when the list of translations grows. --- .../settings/AppearanceSettingsPage.kt | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/settings/AppearanceSettingsPage.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/settings/AppearanceSettingsPage.kt index bc3129824..abbf58e7f 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/settings/AppearanceSettingsPage.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/settings/AppearanceSettingsPage.kt @@ -13,6 +13,8 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.itemsIndexed import androidx.compose.foundation.lazy.LazyListScope import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape @@ -213,21 +215,22 @@ private fun AppearanceLanguageBottomSheet( }, sheetState = sheetState, ) { - Column( + LazyColumn( modifier = Modifier .fillMaxWidth() .padding(bottom = 16.dp), - verticalArrangement = Arrangement.spacedBy(0.dp), ) { - Text( - text = stringResource(Res.string.settings_appearance_app_language_sheet_title), - style = MaterialTheme.typography.titleLarge, - color = MaterialTheme.colorScheme.onSurface, - fontWeight = FontWeight.SemiBold, - modifier = Modifier.padding(horizontal = 16.dp, vertical = 14.dp), - ) + item { + Text( + text = stringResource(Res.string.settings_appearance_app_language_sheet_title), + style = MaterialTheme.typography.titleLarge, + color = MaterialTheme.colorScheme.onSurface, + fontWeight = FontWeight.SemiBold, + modifier = Modifier.padding(horizontal = 16.dp, vertical = 14.dp), + ) + } - options.forEachIndexed { index, option -> + itemsIndexed(options) { index, option -> if (index > 0) { NuvioBottomSheetDivider() }