From 821f034d18930c5c32d1c010a72bff15775b9337 Mon Sep 17 00:00:00 2001 From: Stanislav Dmitrenko <7953703+avently@users.noreply.github.com> Date: Sat, 11 Jan 2025 05:05:05 +0700 Subject: [PATCH] Revert "android, desktop: ability to scroll in all alerts if screen is small (#5470)" (#5509) This reverts commit 2793692a16ab45d7a81e0e1ce75079ffa36577aa. --- .../chat/simplex/common/views/helpers/AlertManager.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/AlertManager.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/AlertManager.kt index 30c5d9cc3c..6bfcf2809f 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/AlertManager.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/AlertManager.kt @@ -297,7 +297,7 @@ private fun AlertContent( belowTextContent: @Composable (() -> Unit) = {}, content: @Composable (() -> Unit) ) { - BoxWithConstraints(Modifier.verticalScroll(rememberScrollState())) { + BoxWithConstraints { Column( Modifier .padding(bottom = if (appPlatform.isDesktop) DEFAULT_PADDING else DEFAULT_PADDING_HALF) @@ -311,6 +311,7 @@ private fun AlertContent( if (text != null) { Column(Modifier.heightIn(max = this@BoxWithConstraints.maxHeight * 0.7f) .padding(start = DEFAULT_PADDING, end = DEFAULT_PADDING) + .verticalScroll(rememberScrollState()) ) { SelectionContainer { Text( @@ -333,9 +334,10 @@ private fun AlertContent( @Composable private fun AlertContent(text: AnnotatedString?, hostDevice: Pair?, extraPadding: Boolean = false, content: @Composable (() -> Unit)) { - BoxWithConstraints(Modifier.verticalScroll(rememberScrollState())) { + BoxWithConstraints { Column( Modifier + .verticalScroll(rememberScrollState()) .padding(bottom = if (appPlatform.isDesktop) DEFAULT_PADDING else DEFAULT_PADDING_HALF) ) { if (appPlatform.isDesktop) { @@ -347,6 +349,7 @@ private fun AlertContent(text: AnnotatedString?, hostDevice: Pair if (text != null) { Column( Modifier.heightIn(max = this@BoxWithConstraints.maxHeight * 0.7f) + .verticalScroll(rememberScrollState()) ) { SelectionContainer { Text(