Skip to content

Commit ba8b874

Browse files
committed
Animate composer attachments and fix Add icon color
1 parent 0528fe9 commit ba8b874

File tree

1 file changed

+10
-5
lines changed
  • stream-chat-android-ai-compose/src/main/kotlin/io/getstream/chat/android/ai/compose/ui/component

1 file changed

+10
-5
lines changed

stream-chat-android-ai-compose/src/main/kotlin/io/getstream/chat/android/ai/compose/ui/component/ChatComposer.kt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ public fun ChatComposer(
208208
},
209209
colors = IconButtonDefaults.outlinedIconButtonColors(
210210
containerColor = MaterialTheme.colorScheme.surface,
211+
contentColor = MaterialTheme.colorScheme.onSurface,
211212
),
212213
border = BorderStroke(1.dp, MaterialTheme.colorScheme.outline),
213214
) {
@@ -285,11 +286,15 @@ private fun TextField(
285286
) {
286287
Column {
287288
val hasAttachments = attachments.isNotEmpty()
288-
if (hasAttachments) {
289-
SelectedAttachmentList(
290-
uris = attachments,
291-
onRemoveAttachment = onRemoveAttachment,
292-
)
289+
AnimatedContent(
290+
targetState = hasAttachments,
291+
) { visible ->
292+
if (visible) {
293+
SelectedAttachmentList(
294+
uris = attachments,
295+
onRemoveAttachment = onRemoveAttachment,
296+
)
297+
}
293298
}
294299
Row(
295300
verticalAlignment = Alignment.CenterVertically,

0 commit comments

Comments
 (0)