From 7b6571f2086874b88df630869c201b947df4d371 Mon Sep 17 00:00:00 2001 From: Danil Nikolaev Date: Wed, 17 Dec 2025 09:21:22 +0300 Subject: [PATCH] Feat: Add animation to reply summary visibility This commit wraps the reply summary `Text` composable within an `AnimatedVisibility` component. This ensures that the summary animates in and out of view smoothly when its content changes, preventing abrupt layout shifts. --- .../fast/messageshistory/presentation/attachments/Reply.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/feature/messageshistory/src/main/kotlin/dev/meloda/fast/messageshistory/presentation/attachments/Reply.kt b/feature/messageshistory/src/main/kotlin/dev/meloda/fast/messageshistory/presentation/attachments/Reply.kt index 1c0a23fb..f51d8076 100644 --- a/feature/messageshistory/src/main/kotlin/dev/meloda/fast/messageshistory/presentation/attachments/Reply.kt +++ b/feature/messageshistory/src/main/kotlin/dev/meloda/fast/messageshistory/presentation/attachments/Reply.kt @@ -1,5 +1,6 @@ package dev.meloda.fast.messageshistory.presentation.attachments +import androidx.compose.animation.AnimatedVisibility import androidx.compose.foundation.background import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement @@ -78,9 +79,9 @@ fun Reply( overflow = TextOverflow.Ellipsis ) - summary?.let { + AnimatedVisibility(summary != null) { Text( - text = summary, + text = summary.orEmpty(), style = MaterialTheme.typography.labelSmall, maxLines = 1, overflow = TextOverflow.Ellipsis