diff --git a/app/src/main/kotlin/io/flamenet/messenger/app/MainActivity.kt b/app/src/main/kotlin/io/flamenet/messenger/app/MainActivity.kt index 2364bf2..e6625ee 100644 --- a/app/src/main/kotlin/io/flamenet/messenger/app/MainActivity.kt +++ b/app/src/main/kotlin/io/flamenet/messenger/app/MainActivity.kt @@ -104,20 +104,34 @@ private fun Root(model: MessengerViewModel = viewModel()) { // sign-out explanation was unreadable and there was no // way back to another tab. // - // ⚠️ Only the screens WITHOUT a lazy list may scroll. - // Contacts owns a LazyColumn, and a lazy list inside a - // vertically scrolling Column is measured with infinite - // height and crashes outright. + // 🔴 **Every screen scrolls, Contacts included.** + // + // This used to exempt Contacts, because "a lazy list + // inside a vertically scrolling Column is measured with + // infinite height and crashes outright". True — but + // only for an UNBOUNDED lazy list, and the buddy list + // has carried `heightIn(max = 320.dp)` since it was put + // in its own card. The exemption outlived its reason. + // + // ⚠️ What it cost: Groups sits below the buddy list on + // this screen, so opening **New group** pushed the + // member checkboxes and the **Create group** button past + // the bottom of a screen that could not scroll. The + // name field was reachable and nothing else was — you + // could type a group name and then only Cancel. + // Measured on a 1080×2400 emulator: the field landed at + // y≈1879, the button past the tab bar at y≈2280, and a + // `uiautomator dump` found no scrollable container and + // no "Create group" node at all. + // + // ⚠️ Before exempting a screen here again, check what is + // BELOW the lazy list, not just the list itself. And + // keep the buddy list bounded — remove that height and + // this does crash. Column( modifier = Modifier .weight(1f) - .then( - if (current.screen == MessengerViewModel.Phase.Screen.CONTACTS) { - Modifier - } else { - Modifier.verticalScroll(rememberScrollState()) - } - ), + .verticalScroll(rememberScrollState()), verticalArrangement = Arrangement.spacedBy(12.dp), ) { when (current.screen) {