Moves MaxWidth for Chat bubbles to Shapes

This commit is contained in:
Vitor Pamplona
2023-06-25 16:49:33 -04:00
parent 53bfd40a31
commit ca3f4c3ec6
2 changed files with 5 additions and 2 deletions
@@ -71,6 +71,7 @@ import com.vitorpamplona.amethyst.ui.components.RobohashFallbackAsyncImage
import com.vitorpamplona.amethyst.ui.components.SensitivityWarning import com.vitorpamplona.amethyst.ui.components.SensitivityWarning
import com.vitorpamplona.amethyst.ui.components.TranslatableRichTextViewer import com.vitorpamplona.amethyst.ui.components.TranslatableRichTextViewer
import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
import com.vitorpamplona.amethyst.ui.theme.ChatBubbleMaxSizeModifier
import com.vitorpamplona.amethyst.ui.theme.ChatBubbleShapeMe import com.vitorpamplona.amethyst.ui.theme.ChatBubbleShapeMe
import com.vitorpamplona.amethyst.ui.theme.ChatBubbleShapeThem import com.vitorpamplona.amethyst.ui.theme.ChatBubbleShapeThem
import com.vitorpamplona.amethyst.ui.theme.DoubleHorzSpacer import com.vitorpamplona.amethyst.ui.theme.DoubleHorzSpacer
@@ -239,7 +240,7 @@ fun NormalChatNote(
) { ) {
val drawAuthorInfo by remember { val drawAuthorInfo by remember {
derivedStateOf { derivedStateOf {
(innerQuote || !accountViewModel.isLoggedUser(note.author)) && note.event !is PrivateDmEvent note.event !is PrivateDmEvent && (innerQuote || !accountViewModel.isLoggedUser(note.author))
} }
} }
@@ -302,7 +303,7 @@ fun NormalChatNote(
var popupExpanded by remember { mutableStateOf(false) } var popupExpanded by remember { mutableStateOf(false) }
val modif2 = remember { val modif2 = remember {
if (innerQuote) Modifier else Modifier.fillMaxWidth(0.85f) if (innerQuote) Modifier else ChatBubbleMaxSizeModifier
} }
val clickableModifier = remember { val clickableModifier = remember {
@@ -83,3 +83,5 @@ val AccountPictureModifier = Modifier.width(55.dp).height(55.dp).clip(shape = Ci
val ShowMoreRelaysButtonIconButtonModifier = Modifier.size(24.dp) val ShowMoreRelaysButtonIconButtonModifier = Modifier.size(24.dp)
val ShowMoreRelaysButtonIconModifier = Modifier.size(15.dp) val ShowMoreRelaysButtonIconModifier = Modifier.size(15.dp)
val ShowMoreRelaysButtonBoxModifer = Modifier.fillMaxWidth().height(25.dp) val ShowMoreRelaysButtonBoxModifer = Modifier.fillMaxWidth().height(25.dp)
val ChatBubbleMaxSizeModifier = Modifier.fillMaxWidth(0.85f)