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:
+3
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user