diff --git a/stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/robots/UserRobotMessageListAsserts.kt b/stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/robots/UserRobotMessageListAsserts.kt index 05c5276b127..797a8d35382 100644 --- a/stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/robots/UserRobotMessageListAsserts.kt +++ b/stream-chat-android-compose-sample/src/androidTestE2eDebug/kotlin/io/getstream/chat/android/compose/robots/UserRobotMessageListAsserts.kt @@ -304,7 +304,9 @@ fun UserRobot.assertAlsoInTheChannelLabelInThread(): UserRobot { fun UserRobot.assertGiphyImage(isDisplayed: Boolean = true): UserRobot { if (isDisplayed) { - assertTrue(Message.giphy.waitToAppear().isDisplayed()) + device.retryOnStaleObjectException { + assertTrue(Message.giphy.waitToAppear().isDisplayed()) + } } else { assertFalse(Message.giphy.waitToDisappear().isDisplayed()) } diff --git a/stream-chat-android-compose/api/stream-chat-android-compose.api b/stream-chat-android-compose/api/stream-chat-android-compose.api index 513a8068cae..cd88e680810 100644 --- a/stream-chat-android-compose/api/stream-chat-android-compose.api +++ b/stream-chat-android-compose/api/stream-chat-android-compose.api @@ -723,6 +723,13 @@ public final class io/getstream/chat/android/compose/ui/attachments/factory/Comp public final fun getLambda-2$stream_chat_android_compose_release ()Lkotlin/jvm/functions/Function4; } +public final class io/getstream/chat/android/compose/ui/attachments/factory/ComposableSingletons$GiphyAttachmentFactoryKt { + public static final field INSTANCE Lio/getstream/chat/android/compose/ui/attachments/factory/ComposableSingletons$GiphyAttachmentFactoryKt; + public static field lambda-1 Lkotlin/jvm/functions/Function4; + public fun ()V + public final fun getLambda-1$stream_chat_android_compose_release ()Lkotlin/jvm/functions/Function4; +} + public final class io/getstream/chat/android/compose/ui/attachments/factory/ComposableSingletons$MediaAttachmentFactoryKt { public static final field INSTANCE Lio/getstream/chat/android/compose/ui/attachments/factory/ComposableSingletons$MediaAttachmentFactoryKt; public static field lambda-1 Lkotlin/jvm/functions/Function3; @@ -1731,13 +1738,6 @@ public final class io/getstream/chat/android/compose/ui/components/messageoption public static final fun defaultMessageOptionsState (Lio/getstream/chat/android/models/Message;Lio/getstream/chat/android/models/User;ZLjava/util/Set;Landroidx/compose/runtime/Composer;I)Ljava/util/List; } -public final class io/getstream/chat/android/compose/ui/components/messages/ComposableSingletons$GiphyMessageContentKt { - public static final field INSTANCE Lio/getstream/chat/android/compose/ui/components/messages/ComposableSingletons$GiphyMessageContentKt; - public static field lambda-1 Lkotlin/jvm/functions/Function2; - public fun ()V - public final fun getLambda-1$stream_chat_android_compose_release ()Lkotlin/jvm/functions/Function2; -} - public final class io/getstream/chat/android/compose/ui/components/messages/ComposableSingletons$MessageReactionItemKt { public static final field INSTANCE Lio/getstream/chat/android/compose/ui/components/messages/ComposableSingletons$MessageReactionItemKt; public static field lambda-1 Lkotlin/jvm/functions/Function2; @@ -2960,6 +2960,7 @@ public abstract interface class io/getstream/chat/android/compose/ui/theme/ChatC public abstract fun FileAttachmentPreviewContent (Landroidx/compose/ui/Modifier;Ljava/util/List;Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;I)V public abstract fun FileUploadContent (Lio/getstream/chat/android/compose/state/messages/attachments/AttachmentState;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V public abstract fun FileUploadItem (Lio/getstream/chat/android/models/Attachment;Landroidx/compose/ui/Modifier;Landroidx/compose/runtime/Composer;I)V + public abstract fun GiphyAttachmentContent (Lio/getstream/chat/android/compose/state/messages/attachments/AttachmentState;Landroidx/compose/ui/Modifier;Landroidx/compose/runtime/Composer;I)V public abstract fun GroupChannelInfoAddMembersButton (Lkotlin/jvm/functions/Function0;Landroidx/compose/runtime/Composer;I)V public abstract fun GroupChannelInfoExpandMembersItem (Landroidx/compose/foundation/lazy/LazyItemScope;ILkotlin/jvm/functions/Function0;Landroidx/compose/runtime/Composer;I)V public abstract fun GroupChannelInfoMemberItem (Landroidx/compose/foundation/lazy/LazyItemScope;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Member;ZLkotlin/jvm/functions/Function0;Landroidx/compose/runtime/Composer;I)V @@ -3139,6 +3140,7 @@ public final class io/getstream/chat/android/compose/ui/theme/ChatComponentFacto public static fun FileAttachmentPreviewContent (Lio/getstream/chat/android/compose/ui/theme/ChatComponentFactory;Landroidx/compose/ui/Modifier;Ljava/util/List;Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;I)V public static fun FileUploadContent (Lio/getstream/chat/android/compose/ui/theme/ChatComponentFactory;Lio/getstream/chat/android/compose/state/messages/attachments/AttachmentState;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V public static fun FileUploadItem (Lio/getstream/chat/android/compose/ui/theme/ChatComponentFactory;Lio/getstream/chat/android/models/Attachment;Landroidx/compose/ui/Modifier;Landroidx/compose/runtime/Composer;I)V + public static fun GiphyAttachmentContent (Lio/getstream/chat/android/compose/ui/theme/ChatComponentFactory;Lio/getstream/chat/android/compose/state/messages/attachments/AttachmentState;Landroidx/compose/ui/Modifier;Landroidx/compose/runtime/Composer;I)V public static fun GroupChannelInfoAddMembersButton (Lio/getstream/chat/android/compose/ui/theme/ChatComponentFactory;Lkotlin/jvm/functions/Function0;Landroidx/compose/runtime/Composer;I)V public static fun GroupChannelInfoExpandMembersItem (Lio/getstream/chat/android/compose/ui/theme/ChatComponentFactory;Landroidx/compose/foundation/lazy/LazyItemScope;ILkotlin/jvm/functions/Function0;Landroidx/compose/runtime/Composer;I)V public static fun GroupChannelInfoMemberItem (Lio/getstream/chat/android/compose/ui/theme/ChatComponentFactory;Landroidx/compose/foundation/lazy/LazyItemScope;Lio/getstream/chat/android/models/User;Lio/getstream/chat/android/models/Member;ZLkotlin/jvm/functions/Function0;Landroidx/compose/runtime/Composer;I)V @@ -3671,8 +3673,8 @@ public final class io/getstream/chat/android/compose/ui/theme/ReactionOptionsThe public final class io/getstream/chat/android/compose/ui/theme/StreamColors { public static final field $stable I public static final field Companion Lio/getstream/chat/android/compose/ui/theme/StreamColors$Companion; - public synthetic fun (JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJIIIILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJIIIILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJLkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1-0d7_KjU ()J public final fun component10-0d7_KjU ()J public final fun component100-0d7_KjU ()J @@ -3680,6 +3682,8 @@ public final class io/getstream/chat/android/compose/ui/theme/StreamColors { public final fun component102-0d7_KjU ()J public final fun component103-0d7_KjU ()J public final fun component104-0d7_KjU ()J + public final fun component105-0d7_KjU ()J + public final fun component106-0d7_KjU ()J public final fun component11-0d7_KjU ()J public final fun component12-0d7_KjU ()J public final fun component13-0d7_KjU ()J @@ -3777,8 +3781,8 @@ public final class io/getstream/chat/android/compose/ui/theme/StreamColors { public final fun component97-0d7_KjU ()J public final fun component98-0d7_KjU ()J public final fun component99-0d7_KjU ()J - public final fun copy-rabOOY8 (JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ)Lio/getstream/chat/android/compose/ui/theme/StreamColors; - public static synthetic fun copy-rabOOY8$default (Lio/getstream/chat/android/compose/ui/theme/StreamColors;JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJIIIILjava/lang/Object;)Lio/getstream/chat/android/compose/ui/theme/StreamColors; + public final fun copy-_FuyHbg (JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ)Lio/getstream/chat/android/compose/ui/theme/StreamColors; + public static synthetic fun copy-_FuyHbg$default (Lio/getstream/chat/android/compose/ui/theme/StreamColors;JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJIIIILjava/lang/Object;)Lio/getstream/chat/android/compose/ui/theme/StreamColors; public fun equals (Ljava/lang/Object;)Z public final fun getAccentBlack-0d7_KjU ()J public final fun getAccentError-0d7_KjU ()J @@ -3803,7 +3807,9 @@ public final class io/getstream/chat/android/compose/ui/theme/StreamColors { public final fun getBackgroundElevationElevation0-0d7_KjU ()J public final fun getBackgroundElevationElevation2-0d7_KjU ()J public final fun getBadgeBgInverse-0d7_KjU ()J + public final fun getBadgeBgOverlay-0d7_KjU ()J public final fun getBadgeText-0d7_KjU ()J + public final fun getBadgeTextOnAccent-0d7_KjU ()J public final fun getBarsBackground-0d7_KjU ()J public final fun getBorderCoreDefault-0d7_KjU ()J public final fun getBorderCoreImage-0d7_KjU ()J diff --git a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/content/GiphyAttachmentContent.kt b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/content/GiphyAttachmentContent.kt index 382805f0250..1f4362672d4 100644 --- a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/content/GiphyAttachmentContent.kt +++ b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/content/GiphyAttachmentContent.kt @@ -21,18 +21,19 @@ import android.content.Intent import android.net.Uri import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.Image +import androidx.compose.foundation.background import androidx.compose.foundation.combinedClickable import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.foundation.layout.width -import androidx.compose.foundation.layout.wrapContentHeight +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider -import androidx.compose.runtime.derivedStateOf -import androidx.compose.runtime.getValue import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -42,7 +43,9 @@ import androidx.compose.ui.graphics.toArgb import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.platform.testTag import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.DpSize @@ -53,13 +56,17 @@ import io.getstream.chat.android.client.utils.attachment.isGiphy import io.getstream.chat.android.compose.R import io.getstream.chat.android.compose.state.messages.attachments.AttachmentState import io.getstream.chat.android.compose.ui.theme.ChatTheme +import io.getstream.chat.android.compose.ui.theme.MessageStyling import io.getstream.chat.android.compose.ui.theme.StreamDimens +import io.getstream.chat.android.compose.ui.theme.StreamTokens import io.getstream.chat.android.compose.ui.util.AsyncImagePreviewHandler import io.getstream.chat.android.compose.ui.util.StreamAsyncImage import io.getstream.chat.android.compose.ui.util.applyIf +import io.getstream.chat.android.compose.ui.util.shouldBeDisplayedAsFullSizeAttachment import io.getstream.chat.android.models.Attachment import io.getstream.chat.android.models.AttachmentType import io.getstream.chat.android.models.Message +import io.getstream.chat.android.ui.common.utils.GiphyInfo import io.getstream.chat.android.ui.common.utils.GiphyInfoType import io.getstream.chat.android.ui.common.utils.GiphySizingMode import io.getstream.chat.android.ui.common.utils.giphyInfo @@ -147,7 +154,7 @@ public fun GiphyAttachmentContent( public fun GiphyAttachmentContent( state: AttachmentState, modifier: Modifier = Modifier, - giphyInfoType: GiphyInfoType = GiphyInfoType.ORIGINAL, + giphyInfoType: GiphyInfoType = GiphyInfoType.FIXED_HEIGHT_DOWNSAMPLED, giphySizingMode: GiphySizingMode = GiphySizingMode.ADAPTIVE, contentScale: ContentScale = ContentScale.Crop, onItemClick: (GiphyAttachmentClickData) -> Unit = { @@ -168,55 +175,19 @@ public fun GiphyAttachmentContent( "Missing preview URL." } - val density = LocalDensity.current - val giphyInfo = attachment.giphyInfo(giphyInfoType) - val maxWidth = ChatTheme.dimens.attachmentsContentGiphyMaxWidth - val maxHeight = ChatTheme.dimens.attachmentsContentGiphyMaxHeight - - val width = ChatTheme.dimens.attachmentsContentGiphyWidth - val height = ChatTheme.dimens.attachmentsContentGiphyHeight - - val giphyDimensions: DpSize by remember(key1 = giphyInfo) { - derivedStateOf { - if (giphyInfo != null) { - with(density) { - val giphyWidth = giphyInfo.width.toDp() - val giphyHeight = giphyInfo.height.toDp() - - when { - giphySizingMode == GiphySizingMode.FIXED_SIZE -> { - DpSize( - width = width.coerceIn( - minimumValue = null, - maximumValue = maxWidth, - ), - height = height.coerceIn( - minimumValue = null, - maximumValue = maxHeight, - ), - ) - } - - else -> calculateResultingDimensions( - maxWidth = maxWidth, - maxHeight = maxHeight, - giphyWidth = giphyWidth, - giphyHeight = giphyHeight, - ) - } - } - } else { - DpSize(maxWidth, maxHeight) - } - } - } + val giphyDimensions: DpSize = calculateSize(giphyInfo, giphySizingMode) + val shouldBeFullSize = message.shouldBeDisplayedAsFullSizeAttachment() Box( modifier = modifier + .testTag("Stream_GiphyContent") .size(giphyDimensions) - .applyIf(message.text.isNotEmpty()) { clip(ChatTheme.shapes.attachment) } + .applyIf(!shouldBeFullSize) { + padding(MessageStyling.messageSectionPadding) + .clip(ChatTheme.shapes.attachment) + } .combinedClickable( indication = null, interactionSource = remember { MutableInteractionSource() }, @@ -240,16 +211,83 @@ public fun GiphyAttachmentContent( contentScale = contentScale, ) - Image( - modifier = Modifier + GiphyLabel( + Modifier .align(Alignment.BottomStart) - .padding(8.dp) - .width(64.dp) - .wrapContentHeight(), - painter = painterResource(R.drawable.stream_compose_giphy_label), + .padding(StreamTokens.spacingXs), + ) + } +} + +@Composable +private fun calculateSize( + giphyInfo: GiphyInfo?, + giphySizingMode: GiphySizingMode, +): DpSize { + val density = LocalDensity.current + + val maxWidth = ChatTheme.dimens.attachmentsContentGiphyMaxWidth + val maxHeight = ChatTheme.dimens.attachmentsContentGiphyMaxHeight + + val width = ChatTheme.dimens.attachmentsContentGiphyWidth + val height = ChatTheme.dimens.attachmentsContentGiphyHeight + + val giphyDimensions: DpSize = remember(giphyInfo, density, maxWidth, width, maxHeight, height) { + if (giphyInfo != null) { + with(density) { + val giphyWidth = giphyInfo.width.toDp() + val giphyHeight = giphyInfo.height.toDp() + + when { + giphySizingMode == GiphySizingMode.FIXED_SIZE -> { + DpSize( + width = width.coerceIn( + minimumValue = null, + maximumValue = maxWidth, + ), + height = height.coerceIn( + minimumValue = null, + maximumValue = maxHeight, + ), + ) + } + + else -> calculateResultingDimensions( + maxWidth = maxWidth, + maxHeight = maxHeight, + giphyWidth = giphyWidth, + giphyHeight = giphyHeight, + ) + } + } + } else { + DpSize(maxWidth, maxHeight) + } + } + return giphyDimensions +} + +@Composable +private fun GiphyLabel(modifier: Modifier) { + val colors = ChatTheme.colors + Row( + modifier = modifier + .background(colors.badgeBgOverlay, RoundedCornerShape(StreamTokens.radiusLg)) + .padding(horizontal = StreamTokens.spacingXs, vertical = StreamTokens.spacing2xs), + horizontalArrangement = Arrangement.spacedBy(StreamTokens.spacing2xs), + verticalAlignment = Alignment.CenterVertically, + ) { + Image( + modifier = Modifier.size(12.dp), + painter = painterResource(R.drawable.stream_ic_command_giphy), contentDescription = null, contentScale = ContentScale.Inside, ) + Text( + text = stringResource(R.string.stream_compose_giphy_label), + style = ChatTheme.typography.metadataEmphasis, + color = colors.badgeTextOnAccent, + ) } } diff --git a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/factory/GiphyAttachmentFactory.kt b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/factory/GiphyAttachmentFactory.kt index d7bfac2efc1..432b8d3d1e3 100644 --- a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/factory/GiphyAttachmentFactory.kt +++ b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/attachments/factory/GiphyAttachmentFactory.kt @@ -18,10 +18,7 @@ package io.getstream.chat.android.compose.ui.attachments.factory import android.content.Context import androidx.compose.foundation.Image -import androidx.compose.foundation.layout.wrapContentSize -import androidx.compose.runtime.Composable import androidx.compose.ui.layout.ContentScale -import androidx.compose.ui.platform.testTag import io.getstream.chat.android.client.utils.attachment.isGiphy import io.getstream.chat.android.compose.ui.attachments.AttachmentFactory import io.getstream.chat.android.compose.ui.attachments.content.GiphyAttachmentClickData @@ -62,18 +59,7 @@ public class GiphyAttachmentFactory( ) : AttachmentFactory( type = Type.BuiltIn.GIPHY, canHandle = canHandle, - content = @Composable { modifier, state -> - GiphyAttachmentContent( - modifier = modifier - .wrapContentSize() - .testTag("Stream_GiphyContent"), - state = state, - giphyInfoType = giphyInfoType, - giphySizingMode = giphySizingMode, - contentScale = contentScale, - onItemClick = onItemClick, - ) - }, + content = { _, _ -> }, ) { /** * Creates a new instance of [GiphyAttachmentFactory] with the default parameters. diff --git a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/button/StreamButton.kt b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/button/StreamButton.kt index 92d525b8aa5..e2baae9c96d 100644 --- a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/button/StreamButton.kt +++ b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/button/StreamButton.kt @@ -51,13 +51,13 @@ import io.getstream.chat.android.compose.ui.util.ifNotNull @Composable internal fun StreamTextButton( onClick: () -> Unit, + text: String, modifier: Modifier = Modifier, enabled: Boolean = true, style: StreamButtonStyle = StreamButtonStyleDefaults.primarySolid, size: StreamButtonSize = StreamButtonSize.Medium, leadingIcon: Painter? = null, trailingIcon: Painter? = null, - text: String, ) { StreamButton( onClick = onClick, diff --git a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/GiphyMessageContent.kt b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/GiphyMessageContent.kt index f42e7d47af2..87e05503f7a 100644 --- a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/GiphyMessageContent.kt +++ b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/GiphyMessageContent.kt @@ -16,37 +16,35 @@ package io.getstream.chat.android.compose.ui.components.messages -import androidx.compose.foundation.Image import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.Spacer -import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.size -import androidx.compose.foundation.layout.width +import androidx.compose.material3.Icon import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color import androidx.compose.ui.platform.testTag import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource -import androidx.compose.ui.text.style.TextAlign -import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import io.getstream.chat.android.compose.R -import io.getstream.chat.android.compose.ui.attachments.content.MessageAttachmentsContent +import io.getstream.chat.android.compose.state.messages.attachments.AttachmentState +import io.getstream.chat.android.compose.ui.components.button.StreamButtonStyleDefaults +import io.getstream.chat.android.compose.ui.components.button.StreamTextButton import io.getstream.chat.android.compose.ui.theme.ChatTheme -import io.getstream.chat.android.compose.ui.util.clickable +import io.getstream.chat.android.compose.ui.theme.MessageStyling +import io.getstream.chat.android.compose.ui.theme.StreamTokens +import io.getstream.chat.android.models.Attachment +import io.getstream.chat.android.models.AttachmentType import io.getstream.chat.android.models.Message import io.getstream.chat.android.models.User -import io.getstream.chat.android.previewdata.PreviewMessageData import io.getstream.chat.android.ui.common.state.messages.list.CancelGiphy import io.getstream.chat.android.ui.common.state.messages.list.GiphyAction import io.getstream.chat.android.ui.common.state.messages.list.SendGiphy @@ -68,6 +66,8 @@ public fun GiphyMessageContent( modifier: Modifier = Modifier, onGiphyActionClick: (GiphyAction) -> Unit = {}, ) { + val colors = ChatTheme.colors + Column( modifier = modifier, horizontalAlignment = Alignment.CenterHorizontally, @@ -76,141 +76,80 @@ public fun GiphyMessageContent( modifier = Modifier .fillMaxWidth() .height(40.dp) - .padding(horizontal = 8.dp), + .padding(horizontal = StreamTokens.spacingSm, vertical = StreamTokens.spacingXs), verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(StreamTokens.spacingXs), ) { - Image( - modifier = Modifier.size(24.dp), - painter = painterResource(id = R.drawable.stream_compose_ic_giphy), + Icon( + painter = painterResource(R.drawable.stream_compose_ic_eye_open), contentDescription = null, + tint = colors.chatTextOutgoing, ) - - Spacer(modifier = Modifier.width(8.dp)) - - Text( - text = stringResource(id = R.string.stream_compose_message_list_giphy_title), - style = ChatTheme.typography.bodyBold, - maxLines = 1, - overflow = TextOverflow.Ellipsis, - color = ChatTheme.colors.textHighEmphasis, - ) - - Spacer(modifier = Modifier.width(8.dp)) - Text( - text = message.text, - style = ChatTheme.typography.body, - maxLines = 1, - overflow = TextOverflow.Ellipsis, - color = ChatTheme.colors.textLowEmphasis, + text = stringResource(R.string.stream_compose_only_visible_to_you), + style = ChatTheme.typography.captionEmphasis, + color = colors.chatTextOutgoing, ) } - MessageAttachmentsContent( + val attachmentState = AttachmentState( message = message, - currentUser = currentUser, + isMine = message.user.id == currentUser?.id, onLongItemClick = {}, onMediaGalleryPreviewResult = {}, ) - - Spacer( - modifier = Modifier - .fillMaxWidth() - .height(1.dp) - .background(color = ChatTheme.colors.borders), + ChatTheme.componentFactory.GiphyAttachmentContent( + modifier = Modifier.fillMaxWidth(), + state = attachmentState, ) Row( modifier = Modifier - .height(48.dp) + .padding(vertical = StreamTokens.spacingXs) .fillMaxWidth(), - verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(StreamTokens.spacingXs), ) { - GiphyButton( - modifier = Modifier - .fillMaxHeight() - .weight(1f), - text = stringResource(id = R.string.stream_compose_message_list_giphy_cancel), - textColor = ChatTheme.colors.textLowEmphasis, - onClick = { onGiphyActionClick(CancelGiphy(message)) }, - ) - - Spacer( + StreamTextButton( + onClick = { onGiphyActionClick(SendGiphy(message)) }, + text = stringResource(R.string.stream_compose_message_list_giphy_send), + style = StreamButtonStyleDefaults.primaryGhost, modifier = Modifier - .fillMaxHeight() - .width(1.dp) - .background(color = ChatTheme.colors.borders), + .weight(1f) + .testTag("Stream_GiphyButton_Send"), ) - GiphyButton( - modifier = Modifier - .fillMaxHeight() - .weight(1f), - text = stringResource(id = R.string.stream_compose_message_list_giphy_shuffle), - textColor = ChatTheme.colors.textLowEmphasis, + StreamTextButton( onClick = { onGiphyActionClick(ShuffleGiphy(message)) }, - ) - - Spacer( + text = stringResource(R.string.stream_compose_message_list_giphy_shuffle), + style = StreamButtonStyleDefaults.secondaryGhost, modifier = Modifier - .fillMaxHeight() - .width(1.dp) - .background(color = ChatTheme.colors.borders), + .weight(1f) + .testTag("Stream_GiphyButton_Shuffle"), ) - GiphyButton( + StreamTextButton( + onClick = { onGiphyActionClick(CancelGiphy(message)) }, + text = stringResource(R.string.stream_compose_message_list_giphy_cancel), + style = StreamButtonStyleDefaults.secondaryGhost, modifier = Modifier - .fillMaxHeight() - .weight(1f), - text = stringResource(id = R.string.stream_compose_message_list_giphy_send), - textColor = ChatTheme.colors.primaryAccent, - onClick = { onGiphyActionClick(SendGiphy(message)) }, + .weight(1f) + .testTag("Stream_GiphyButton_Cancel"), ) } } } -/** - * Represents an action button in the ephemeral giphy message. - * - * @param text The text displayed on the button. - * @param textColor The color applied to the text. - * @param onClick Handler when the user clicks on action button. - * @param modifier Modifier for styling. - */ -@Composable -internal fun GiphyButton( - text: String, - textColor: Color, - onClick: () -> Unit, - modifier: Modifier = Modifier, -) { - Box( - modifier = modifier.clickable(onClick = onClick), - ) { - Text( - modifier = Modifier - .align(Alignment.Center) - .testTag("Stream_GiphyButton_$text"), - text = text, - style = ChatTheme.typography.bodyBold, - maxLines = 1, - overflow = TextOverflow.Ellipsis, - color = textColor, - textAlign = TextAlign.Center, - ) - } -} - @Preview @Composable private fun GiphyMessageContentPreview() { + val attachment = Attachment(type = AttachmentType.GIPHY, ogUrl = "") ChatTheme { - GiphyMessageContent( - modifier = Modifier.size(600.dp), - message = PreviewMessageData.message1, - currentUser = PreviewMessageData.message1.user, - onGiphyActionClick = {}, - ) + Box(Modifier.background(MessageStyling.backgroundColor(true))) { + GiphyMessageContent( + message = Message(attachments = listOf(attachment)), + currentUser = null, + onGiphyActionClick = {}, + ) + } } } diff --git a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/MessageBubble.kt b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/MessageBubble.kt index 2df19653f35..f21c08f2057 100644 --- a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/MessageBubble.kt +++ b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/MessageBubble.kt @@ -25,12 +25,6 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Shape -import io.getstream.chat.android.client.utils.message.isDeleted -import io.getstream.chat.android.client.utils.message.isErrorOrFailed -import io.getstream.chat.android.client.utils.message.isGiphyEphemeral -import io.getstream.chat.android.compose.ui.theme.ChatTheme -import io.getstream.chat.android.compose.ui.theme.MessageStyling -import io.getstream.chat.android.models.Message /** * Wraps the content of a message in a bubble. @@ -62,20 +56,3 @@ public fun MessageBubble( } } } - -/** - * Determines the background color of the message bubble based on the message content and ownership. - * - * @param outgoing Whether the message is by the current user - * @param message The message data. - * @return A color for the message bubble. - */ -@Composable -internal fun getMessageBubbleColor(outgoing: Boolean, message: Message): Color { - return when { - message.isGiphyEphemeral() -> ChatTheme.colors.giphyMessageBackground - message.isDeleted() -> MessageStyling.backgroundColor(outgoing) - message.isErrorOrFailed() -> MessageStyling.backgroundColor(outgoing) - else -> MessageStyling.backgroundColor(outgoing) - } -} diff --git a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/MessageContent.kt b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/MessageContent.kt index 242c6a51ca0..0e7a81a7eb5 100644 --- a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/MessageContent.kt +++ b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/messages/MessageContent.kt @@ -106,25 +106,6 @@ public fun MessageContent( } } -/** - * Represents the default ephemeral Giphy message content. - * - * @param message The message to show. - * @param onGiphyActionClick Handler for Giphy actions. - */ -@Composable -internal fun DefaultMessageGiphyContent( - message: Message, - currentUser: User?, - onGiphyActionClick: (GiphyAction) -> Unit, -) { - GiphyMessageContent( - message = message, - currentUser = currentUser, - onGiphyActionClick = onGiphyActionClick, - ) -} - /** * Represents the default deleted message content. * @@ -207,6 +188,13 @@ internal fun DefaultMessageContent( ) } + if (info.hasGiphys) { + componentFactory.GiphyAttachmentContent( + modifier = Modifier, + state = attachmentState, + ) + } + if (info.hasFiles) { componentFactory.FileAttachmentContent( modifier = Modifier, diff --git a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/list/MessageItem.kt b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/list/MessageItem.kt index 8d74fc72670..e525d5e0a8d 100644 --- a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/list/MessageItem.kt +++ b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/list/MessageItem.kt @@ -74,7 +74,6 @@ import io.getstream.chat.android.compose.state.reactionoptions.ReactionOptionIte import io.getstream.chat.android.compose.ui.components.messages.MessageContent import io.getstream.chat.android.compose.ui.components.messages.MessageHeaderLabel import io.getstream.chat.android.compose.ui.components.messages.PollMessageContent -import io.getstream.chat.android.compose.ui.components.messages.getMessageBubbleColor import io.getstream.chat.android.compose.ui.theme.ChatTheme import io.getstream.chat.android.compose.ui.theme.MessageReactionListParams import io.getstream.chat.android.compose.ui.theme.MessageStyling @@ -614,7 +613,7 @@ public fun RegularMessageContent( val ownsMessage = messageItem.isMine val messageBubbleShape = MessageStyling.shape(messageItem.groupPosition, outgoing = ownsMessage) - val messageBubbleColor = getMessageBubbleColor(ownsMessage, message = message) + val messageBubbleColor = MessageStyling.backgroundColor(ownsMessage) val content = @Composable { MessageContent( diff --git a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.kt b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.kt index db8f0de8c47..8ff0662f516 100644 --- a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.kt +++ b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.kt @@ -120,7 +120,7 @@ import io.getstream.chat.android.compose.ui.components.composer.MessageInputOpti import io.getstream.chat.android.compose.ui.components.messageoptions.MessageOptions import io.getstream.chat.android.compose.ui.components.messages.DefaultMessageContent import io.getstream.chat.android.compose.ui.components.messages.DefaultMessageDeletedContent -import io.getstream.chat.android.compose.ui.components.messages.DefaultMessageGiphyContent +import io.getstream.chat.android.compose.ui.components.messages.GiphyMessageContent import io.getstream.chat.android.compose.ui.components.messages.MessageComposerQuotedMessage import io.getstream.chat.android.compose.ui.components.messages.MessageFooter import io.getstream.chat.android.compose.ui.components.messages.MessageReactionItem @@ -1226,7 +1226,7 @@ public interface ChatComponentFactory { currentUser: User?, onGiphyActionClick: (GiphyAction) -> Unit, ) { - DefaultMessageGiphyContent( + GiphyMessageContent( message = message, currentUser = currentUser, onGiphyActionClick = onGiphyActionClick, @@ -2894,11 +2894,10 @@ public interface ChatComponentFactory { } /** - * Factory method for creating the content of a file attachment. + * Factory method for creating the content of file attachments in a message. * * @param modifier Modifier for styling the composable. - * @param attachmentState The state of the attachment, containing information about the file. - * [AttachmentPreviewHandler] and the clicked [Attachment]. + * @param attachmentState The state of the attachment. */ @Composable public fun FileAttachmentContent( @@ -2913,6 +2912,29 @@ public interface ChatComponentFactory { ) } + /** + * Factory method for creating the content of Giphy attachments in a message. + * + * @param state The state of the attachment. + * @param modifier Modifier for styling. + */ + @Composable + public fun GiphyAttachmentContent( + state: AttachmentState, + modifier: Modifier, + ) { + io.getstream.chat.android.compose.ui.attachments.content.GiphyAttachmentContent( + state = state, + modifier = modifier, + ) + } + + /** + * Factory method for creating the content of media attachments in a message. + * + * @param state The state of the attachment. + * @param modifier Modifier for styling. + */ @Composable public fun MediaAttachmentContent( state: AttachmentState, diff --git a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamColors.kt b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamColors.kt index b2247a4ccc1..f44db45f5e9 100644 --- a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamColors.kt +++ b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamColors.kt @@ -23,7 +23,7 @@ import androidx.compose.ui.res.colorResource import io.getstream.chat.android.compose.R /** - * Contains all the colors in our palette. Each color is used for various things an can be changed to + * Contains all the colors in our palette. Each color is used for various things and can be changed to * customize the app design style. * @param textHighEmphasis Used for main text and active icon status. * @param textHighEmphasisInverse Used for contrasting backgrounds or elements against the main text and active icon @@ -32,7 +32,6 @@ import io.getstream.chat.android.compose.R * @param disabled Used for disabled icons and empty states. * @param borders Used for borders, the background of self messages, selected items, pressed state, button dividers. * @param inputBackground Used for the input background, deleted messages, section headings. - * @param appBackground Used for the default app background and channel list item background. * @param barsBackground Used for button text, top and bottom bar background and other user messages. * @param overlay Used for general overlays and background when opening modals. * @param overlayDark Used for the date separator background color. @@ -49,12 +48,13 @@ import io.getstream.chat.android.compose.R * in the media gallery preview screen. Most visible in placeholders before the images are loaded. * @param imageBackgroundMessageList Used to set the background colour of videos inside the message list. * Most visible in placeholders before the video previews are loaded. - * @param imageBackgroundMediaGalleryPicker Used to set the background colour of videos inside the media gallery picker - * in the media gallery preview screen. Most visible in placeholders before the videos previews are loaded. + * @param videoBackgroundMediaGalleryPicker Used to set the background color of videos inside the media gallery picker + * in the media gallery preview screen. Most visible in placeholders before the video previews are loaded. * @param showMoreOverlay The color of the overlay displaying how many more media attachments the message contains, * given it contains more than can be displayed in the message list media attachment preview. * @param showMoreCountText The color of the text displaying how many more media attachments the message contains, * given it contains more than can be displayed in the message list media attachment preview. + * @param accentBlack Used for black accent elements. * @param accentError Used for destructive actions and error states. * @param accentNeutral Used for neutral accent for low-priority badges. * @param accentSuccess Used for success states and positive actions. @@ -71,9 +71,11 @@ import io.getstream.chat.android.compose.R * @param avatarPaletteText5 Used for avatar text color. * @param backgroundCoreDisabled Used for disabled background in components like buttons. * @param backgroundCoreSurface Used for surface background in components like buttons. + * @param backgroundCoreSurfaceSubtle Used for subtle surface backgrounds. * @param backgroundElevationElevation0 Used for base elevation surface backgrounds. * @param borderCoreImage Used for image frame border treatment. * @param borderCoreDefault Used for default border color. + * @param borderCoreOnAccent Used for borders on accent backgrounds. * @param borderCoreOnDark Used for borders on dark backgrounds. * @param borderCoreSurfaceSubtle Used for very light separators. * @param borderCorePrimary Used for selected or active state border. @@ -94,6 +96,14 @@ import io.getstream.chat.android.compose.R * @param textSecondary Used for secondary text color with lower emphasis. * @param textTertiary Used for tertiary text color with lowest emphasis. * @param textDisabled Used for disabled text and icon color. + * @param badgeBgInverse Used for badge background with inverse color scheme. + * @param badgeBgOverlay Used for badge background when displayed as an overlay. + * @param badgeText Used for badge text color. + * @param badgeTextOnAccent Used for badge text color on accent backgrounds. + * @param stateBgDisabled Used for disabled state background. + * @param stateTextDisabled Used for disabled state text color. + * @param appBackground Used for the default app background. + * @param backgroundCoreSelected Used for selected state background. * @param backgroundElevationElevation2 Used for elevated surface backgrounds at elevation level 2. * @param buttonDestructiveBg Used for destructive button background. * @param buttonDestructiveBorder Used for destructive button border. @@ -115,6 +125,11 @@ import io.getstream.chat.android.compose.R * @param chatReplyIndicatorOutgoing Used for the reply indicator color in outgoing messages. * @param chatTextIncoming Used for incoming message text color in chat bubbles. * @param chatTextOutgoing Used for outgoing message text color in chat bubbles. + * @param chatTextLink Used for link text color in chat messages. + * @param chatTextMention Used for mention text color in chat messages. + * @param chatTextTimestamp Used for timestamp text color in chat messages. + * @param controlPlayControlBg Used for play control button background. + * @param controlPlayControlIcon Used for play control button icon. * @param controlRemoveBg Used for remove control background. * @param controlRemoveBorder Used for remove control border. * @param controlRemoveIcon Used for remove control icon. @@ -193,8 +208,10 @@ public data class StreamColors( public val textSecondary: Color, public val textTertiary: Color, public val textDisabled: Color, - public val badgeText: Color = textOnAccent, public val badgeBgInverse: Color, + public val badgeBgOverlay: Color, + public val badgeText: Color = textOnAccent, + public val badgeTextOnAccent: Color = textOnAccent, public val stateBgDisabled: Color, public val stateTextDisabled: Color, public val appBackground: Color = backgroundElevationElevation0, @@ -277,6 +294,8 @@ public data class StreamColors( backgroundCoreSurfaceSubtle = StreamPrimitiveColors.slate200, backgroundElevationElevation0 = StreamPrimitiveColors.baseWhite, backgroundElevationElevation2 = StreamPrimitiveColors.baseWhite, + badgeBgInverse = StreamPrimitiveColors.baseBlack, + badgeBgOverlay = StreamPrimitiveColors.baseBlack.copy(alpha = .75f), borderCoreDefault = StreamPrimitiveColors.slate150, borderCoreImage = StreamPrimitiveColors.baseBlack.copy(alpha = .1f), borderCoreOnAccent = StreamPrimitiveColors.baseWhite, @@ -300,7 +319,6 @@ public data class StreamColors( textPrimary = StreamPrimitiveColors.slate900, textSecondary = StreamPrimitiveColors.slate700, textTertiary = StreamPrimitiveColors.slate500, - badgeBgInverse = StreamPrimitiveColors.baseBlack, stateBgDisabled = StreamPrimitiveColors.slate200, stateTextDisabled = StreamPrimitiveColors.slate400, avatarPaletteBg1 = StreamPrimitiveColors.blue100, @@ -393,6 +411,7 @@ public data class StreamColors( textSecondary = StreamPrimitiveColors.neutral300, textTertiary = StreamPrimitiveColors.neutral400, badgeBgInverse = StreamPrimitiveColors.baseBlack, + badgeBgOverlay = StreamPrimitiveColors.baseBlack.copy(alpha = .75f), stateBgDisabled = StreamPrimitiveColors.slate800, stateTextDisabled = StreamPrimitiveColors.slate600, avatarPaletteBg1 = StreamPrimitiveColors.blue800, diff --git a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/util/MessageUtils.kt b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/util/MessageUtils.kt index 1926b65d7fa..bd4ab0c8557 100644 --- a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/util/MessageUtils.kt +++ b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/util/MessageUtils.kt @@ -21,6 +21,7 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.State import androidx.compose.runtime.remember import androidx.lifecycle.compose.collectAsStateWithLifecycle +import io.getstream.chat.android.client.utils.message.isGiphyEphemeral import io.getstream.chat.android.compose.R import io.getstream.chat.android.models.AttachmentType import io.getstream.chat.android.models.Message @@ -68,9 +69,10 @@ private val fullSizeAttachmentTypes = setOf( AttachmentType.AUDIO_RECORDING, ) -/** @return If the message's only attachment should occupy the full message bubble */ -internal fun Message.shouldBeDisplayedAsFullSizeAttachment(): Boolean = +/** @return If the message's attachment should occupy the full message bubble */ +internal fun Message.shouldBeDisplayedAsFullSizeAttachment(): Boolean = isGiphyEphemeral() || ( text.isEmpty() && replyTo == null && attachments.size == 1 && attachments.first().type in fullSizeAttachmentTypes + ) /** * @return If the message contains an attachment that is currently being uploaded. diff --git a/stream-chat-android-compose/src/main/res/drawable/stream_compose_giphy_label.xml b/stream-chat-android-compose/src/main/res/drawable/stream_compose_giphy_label.xml deleted file mode 100644 index c55bf8f1c98..00000000000 --- a/stream-chat-android-compose/src/main/res/drawable/stream_compose_giphy_label.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - diff --git a/stream-chat-android-compose/src/main/res/drawable/stream_compose_ic_eye_open.xml b/stream-chat-android-compose/src/main/res/drawable/stream_compose_ic_eye_open.xml new file mode 100644 index 00000000000..6ae6bb7f4d3 --- /dev/null +++ b/stream-chat-android-compose/src/main/res/drawable/stream_compose_ic_eye_open.xml @@ -0,0 +1,26 @@ + + + + + diff --git a/stream-chat-android-compose/src/main/res/drawable/stream_compose_ic_giphy.xml b/stream-chat-android-compose/src/main/res/drawable/stream_compose_ic_giphy.xml deleted file mode 100644 index 213b52e665f..00000000000 --- a/stream-chat-android-compose/src/main/res/drawable/stream_compose_ic_giphy.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - diff --git a/stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.attachments.content_AttachmentsContentTest_giphy_attachment_content.png b/stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.attachments.content_AttachmentsContentTest_giphy_attachment_content.png index b2149cf2ea4..315fbd89ac7 100644 Binary files a/stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.attachments.content_AttachmentsContentTest_giphy_attachment_content.png and b/stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.attachments.content_AttachmentsContentTest_giphy_attachment_content.png differ