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.
This commit is contained in:
2025-12-17 09:21:22 +03:00
parent 389d3f9e52
commit 7b6571f208
@@ -1,5 +1,6 @@
package dev.meloda.fast.messageshistory.presentation.attachments package dev.meloda.fast.messageshistory.presentation.attachments
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Arrangement
@@ -78,9 +79,9 @@ fun Reply(
overflow = TextOverflow.Ellipsis overflow = TextOverflow.Ellipsis
) )
summary?.let { AnimatedVisibility(summary != null) {
Text( Text(
text = summary, text = summary.orEmpty(),
style = MaterialTheme.typography.labelSmall, style = MaterialTheme.typography.labelSmall,
maxLines = 1, maxLines = 1,
overflow = TextOverflow.Ellipsis overflow = TextOverflow.Ellipsis