From 92facf58f772b89336eb10c23d61dbecf13f8a6f Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Date: Sat, 25 Mar 2023 17:02:15 +0000 Subject: [PATCH] android: fix layout of moderated item --- .../app/views/chat/item/MarkedDeletedItemView.kt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/android/app/src/main/java/chat/simplex/app/views/chat/item/MarkedDeletedItemView.kt b/apps/android/app/src/main/java/chat/simplex/app/views/chat/item/MarkedDeletedItemView.kt index 31a570b3ae..47bb33bffc 100644 --- a/apps/android/app/src/main/java/chat/simplex/app/views/chat/item/MarkedDeletedItemView.kt +++ b/apps/android/app/src/main/java/chat/simplex/app/views/chat/item/MarkedDeletedItemView.kt @@ -1,8 +1,7 @@ package chat.simplex.app.views.chat.item import android.content.res.Configuration -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.* import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material.* import androidx.compose.runtime.Composable @@ -31,10 +30,12 @@ fun MarkedDeletedItemView(ci: ChatItem, timedMessagesTTL: Int?, showMember: Bool Modifier.padding(horizontal = 12.dp, vertical = 6.dp), verticalAlignment = Alignment.CenterVertically ) { - if (ci.meta.itemDeleted is CIDeleted.Moderated) { - MarkedDeletedText(String.format(generalGetString(R.string.moderated_item_description), ci.meta.itemDeleted.byGroupMember.chatViewName)) - } else { - MarkedDeletedText(generalGetString(R.string.marked_deleted_description)) + Box(Modifier.fillMaxWidth().weight(1f)) { + if (ci.meta.itemDeleted is CIDeleted.Moderated) { + MarkedDeletedText(String.format(generalGetString(R.string.moderated_item_description), ci.meta.itemDeleted.byGroupMember.chatViewName)) + } else { + MarkedDeletedText(generalGetString(R.string.marked_deleted_description)) + } } CIMetaView(ci, timedMessagesTTL) }