fix(settings): crash when scrolling Settings (nested LazyColumn unbounded height)
v4.4.9 page-order list crashed the Settings screen on scroll: the drag-reorder LazyColumn sits inside the Settings LazyVerticalGrid item, and a vertically scrollable child measured with infinite max height throws IllegalStateException, killing the app before the UI Settings card even renders. Fix: give the LazyColumn a bounded height (itemHeight * items.size = 7 rows × 48dp = 336dp). Drag logic, animation and persistence unchanged. What's-new rewritten in en/zh/tr with ONLY this fix (user rule: replace, never append history). Version stays 4.4.9 (覆盖 per user). Verified: settings + app compile; check_strings.py clean.
This commit is contained in:
1 parent
15ab82f1c8
commit
6636dd8e98
4 files changed
+11
-32
No files matched your search
+7
-1
@@ -617,7 +617,13 @@ private fun DragOrderList(
|
||||
var draggingIndex by remember { mutableIntStateOf(-1) }
|
||||
var dragOffset by remember { mutableStateOf(0f) }
|
||||
|
||||
LazyColumn(state = listState, modifier = Modifier.fillMaxWidth()) {
|
||||
// 固定高度: 嵌套在 LazyVerticalGrid 内必须给有界高度, 否则无限高度约束崩溃
|
||||
LazyColumn(
|
||||
state = listState,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.height(itemHeight * items.size)
|
||||
) {
|
||||
itemsIndexed(items, key = { _, s -> s.second }) { index, screen ->
|
||||
val isDragging = draggingIndex == index
|
||||
Row(
|
||||
|
||||
Reference in new issue
Block a user