From 200d6987eb94e6a06c5025f4f0ae22322fa0a696 Mon Sep 17 00:00:00 2001 From: k1ngsterr1 Date: Tue, 17 Mar 2026 18:12:04 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81:=20=D0=BA=D0=BD=D0=BE?= =?UTF-8?q?=D0=BF=D0=BA=D0=B0=20Install=20Update=20=D1=80=D0=B0=D1=81?= =?UTF-8?q?=D1=82=D1=8F=D0=B3=D0=B8=D0=B2=D0=B0=D0=BB=D0=B0=D1=81=D1=8C=20?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=B2=D0=B5=D1=81=D1=8C=20=D1=8D=D0=BA=D1=80?= =?UTF-8?q?=D0=B0=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Убран лишний Box-обёртка с contentAlignment вокруг Row — Row теперь сам является кликабельным элементом с фиксированной height(50.dp). Убран Spacer внутри Box который конфликтовал с измерением высоты. Co-Authored-By: Claude Sonnet 4.6 --- .../messenger/ui/chats/ChatsListScreen.kt | 93 +++++++++---------- 1 file changed, 43 insertions(+), 50 deletions(-) diff --git a/app/src/main/java/com/rosetta/messenger/ui/chats/ChatsListScreen.kt b/app/src/main/java/com/rosetta/messenger/ui/chats/ChatsListScreen.kt index fa29f26..3eb848d 100644 --- a/app/src/main/java/com/rosetta/messenger/ui/chats/ChatsListScreen.kt +++ b/app/src/main/java/com/rosetta/messenger/ui/chats/ChatsListScreen.kt @@ -1289,7 +1289,7 @@ fun ChatsListScreen( } if (showUpdateBanner) { - Box( + Row( modifier = Modifier .fillMaxWidth() .height(50.dp) @@ -1311,60 +1311,53 @@ fun ChatsListScreen( UpdateManager.downloadAndInstall(context) else -> {} } - }, - contentAlignment = Alignment.CenterStart + } + .padding(horizontal = 16.dp), + verticalAlignment = Alignment.CenterVertically ) { - Row( - modifier = Modifier - .fillMaxWidth() - .padding(horizontal = 16.dp), - verticalAlignment = Alignment.CenterVertically - ) { - Icon( - imageVector = when (curUpdate) { - is UpdateState.Downloading -> TablerIcons.X - else -> TablerIcons.Download - }, - contentDescription = null, - tint = Color.White, - modifier = Modifier.size(22.dp) - ) - Spacer(modifier = Modifier.width(12.dp)) + Icon( + imageVector = when (curUpdate) { + is UpdateState.Downloading -> TablerIcons.X + else -> TablerIcons.Download + }, + contentDescription = null, + tint = Color.White, + modifier = Modifier.size(22.dp) + ) + Spacer(modifier = Modifier.width(12.dp)) + Text( + text = when (curUpdate) { + is UpdateState.Downloading -> + "Downloading... ${curUpdate.progress}%" + is UpdateState.ReadyToInstall -> + "Install Update" + is UpdateState.UpdateAvailable -> + "Update Rosetta" + else -> "" + }, + color = Color.White, + fontSize = 15.sp, + fontWeight = FontWeight.Bold, + modifier = Modifier.weight(1f) + ) + if (curUpdate is UpdateState.UpdateAvailable) { Text( - text = when (curUpdate) { - is UpdateState.Downloading -> - "Downloading... ${curUpdate.progress}%" - is UpdateState.ReadyToInstall -> - "Install Update" - is UpdateState.UpdateAvailable -> - "Update Rosetta" - else -> "" - }, - color = Color.White, - fontSize = 15.sp, - fontWeight = FontWeight.Bold, - modifier = Modifier.weight(1f) + text = curUpdate.version, + color = Color.White.copy(alpha = 0.8f), + fontSize = 13.sp, + fontWeight = FontWeight.Medium + ) + } + if (curUpdate is UpdateState.Downloading) { + CircularProgressIndicator( + progress = curUpdate.progress / 100f, + modifier = Modifier.size(20.dp), + color = Color.White, + trackColor = Color.White.copy(alpha = 0.3f), + strokeWidth = 2.dp ) - if (curUpdate is UpdateState.UpdateAvailable) { - Text( - text = curUpdate.version, - color = Color.White.copy(alpha = 0.8f), - fontSize = 13.sp, - fontWeight = FontWeight.Medium - ) - } - if (curUpdate is UpdateState.Downloading) { - CircularProgressIndicator( - progress = curUpdate.progress / 100f, - modifier = Modifier.size(20.dp), - color = Color.White, - trackColor = Color.White.copy(alpha = 0.3f), - strokeWidth = 2.dp - ) - } } } - Spacer(modifier = Modifier.height(12.dp)) } } }