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 3eb848d..fa29f26 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) { - Row( + Box( modifier = Modifier .fillMaxWidth() .height(50.dp) @@ -1311,53 +1311,60 @@ fun ChatsListScreen( UpdateManager.downloadAndInstall(context) else -> {} } - } - .padding(horizontal = 16.dp), - verticalAlignment = Alignment.CenterVertically + }, + contentAlignment = Alignment.CenterStart ) { - 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) { + 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)) 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), + text = when (curUpdate) { + is UpdateState.Downloading -> + "Downloading... ${curUpdate.progress}%" + is UpdateState.ReadyToInstall -> + "Install Update" + is UpdateState.UpdateAvailable -> + "Update Rosetta" + else -> "" + }, color = Color.White, - trackColor = Color.White.copy(alpha = 0.3f), - strokeWidth = 2.dp + fontSize = 15.sp, + fontWeight = FontWeight.Bold, + modifier = Modifier.weight(1f) ) + 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)) } } }