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.
This commit is contained in:
Luqman Fadlli 2026-05-23 18:57:29 +07:00 committed by GitHub
parent 2fa1c87ae7
commit 8b120438b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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()
}