From d314b6e705e15c3b79754c2063c9ec252f6e0699 Mon Sep 17 00:00:00 2001 From: Joshua Owolabi Date: Sun, 20 Oct 2024 10:36:55 +0100 Subject: [PATCH] bug fix for Clicking on Certain Areas of Audio Recording in Message List Displays "Invalid URL" Error --- .../navigation/destinations/AttachmentDestination.kt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/navigation/destinations/AttachmentDestination.kt b/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/navigation/destinations/AttachmentDestination.kt index c9fd9e15e1e..2099f570c98 100644 --- a/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/navigation/destinations/AttachmentDestination.kt +++ b/stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/navigation/destinations/AttachmentDestination.kt @@ -87,11 +87,13 @@ public open class AttachmentDestination( if (url.isNullOrEmpty()) { logger.e { "Wrong URL for attachment. Attachment: $attachment" } - Toast.makeText( - context, - context.getString(R.string.stream_ui_message_list_attachment_invalid_url), - Toast.LENGTH_SHORT, - ).show() + if (attachment.type == AttachmentType.UNKNOWN) { + Toast.makeText( + context, + context.getString(R.string.stream_ui_message_list_attachment_invalid_url), + Toast.LENGTH_SHORT, + ).show() + } return }