From 6d6720a511c94604d1586c414c2a03ef3b4edb21 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Thu, 6 Jul 2023 15:51:46 -0400 Subject: [PATCH] Adds reactions to Chats and Communities --- .../amethyst/ui/note/ChannelCardCompose.kt | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/ChannelCardCompose.kt b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/ChannelCardCompose.kt index 774f0093c..ecf7e16c2 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/ui/note/ChannelCardCompose.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/ui/note/ChannelCardCompose.kt @@ -65,6 +65,7 @@ import com.vitorpamplona.amethyst.ui.screen.loggedIn.ScheduledFlag import com.vitorpamplona.amethyst.ui.theme.DoubleHorzSpacer import com.vitorpamplona.amethyst.ui.theme.QuoteBorder import com.vitorpamplona.amethyst.ui.theme.Size35dp +import com.vitorpamplona.amethyst.ui.theme.StdHorzSpacer import com.vitorpamplona.amethyst.ui.theme.StdPadding import com.vitorpamplona.amethyst.ui.theme.StdVertSpacer import com.vitorpamplona.amethyst.ui.theme.newItemBackgroundColor @@ -574,8 +575,14 @@ fun RenderCommunitiesThumb(baseNote: Note, accountViewModel: AccountViewModel, n text = name, fontWeight = FontWeight.Bold, maxLines = 1, - overflow = TextOverflow.Ellipsis + overflow = TextOverflow.Ellipsis, + modifier = Modifier.weight(1f) ) + + Spacer(modifier = StdHorzSpacer) + LikeReaction(baseNote = baseNote, grayTint = MaterialTheme.colors.onSurface, accountViewModel = accountViewModel) + Spacer(modifier = StdHorzSpacer) + ZapReaction(baseNote = baseNote, grayTint = MaterialTheme.colors.onSurface, accountViewModel = accountViewModel) } description?.let { @@ -682,8 +689,14 @@ fun RenderChannelThumb(baseNote: Note, channel: Channel, accountViewModel: Accou text = name, fontWeight = FontWeight.Bold, maxLines = 1, - overflow = TextOverflow.Ellipsis + overflow = TextOverflow.Ellipsis, + modifier = Modifier.weight(1f) ) + + Spacer(modifier = StdHorzSpacer) + LikeReaction(baseNote = baseNote, grayTint = MaterialTheme.colors.onSurface, accountViewModel = accountViewModel) + Spacer(modifier = StdHorzSpacer) + ZapReaction(baseNote = baseNote, grayTint = MaterialTheme.colors.onSurface, accountViewModel = accountViewModel) } description?.let {