Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PBE-5896] Fix/async voice compose render #5395

Merged
merged 4 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
### 🐞 Fixed

### ⬆️ Improved
- `Attachment.uploadId` is only used locally and removed whenever the attachments are uploaded. [#5395](https://github.com/GetStream/stream-chat-android/pull/5395)

### ✅ Added

Expand Down Expand Up @@ -68,6 +69,7 @@

## stream-chat-android-compose
### 🐞 Fixed
- Fix condition to show async-voice attachments on MessageList. [#5395](https://github.com/GetStream/stream-chat-android/pull/5395)

### ⬆️ Improved

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package io.getstream.chat.android.client.attachment

import android.webkit.MimeTypeMap
import io.getstream.chat.android.client.ChatClient
import io.getstream.chat.android.client.extensions.EXTRA_UPLOAD_ID
import io.getstream.chat.android.client.extensions.uploadId
import io.getstream.chat.android.client.uploader.StreamCdnImageMimeTypes
import io.getstream.chat.android.client.utils.ProgressCallback
Expand Down Expand Up @@ -266,7 +267,7 @@ public class AttachmentUploader(private val client: ChatClient = ChatClient.inst
else -> imageUrl
},
assetUrl = uploadedFile.file,
extraData = extraData + uploadedFile.extraData,
extraData = (extraData + uploadedFile.extraData) - EXTRA_UPLOAD_ID,
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ internal class AttachmentUploaderTests {
name = attachment.upload!!.name,
title = attachment.upload!!.name,
uploadState = Attachment.UploadState.Success,
extraData = attachment.extraData - EXTRA_UPLOAD_ID,
)
val result = sut.uploadAttachment(channelType, channelId, attachment)
result.shouldBeInstanceOf(Result.Success::class)
Expand All @@ -150,6 +151,7 @@ internal class AttachmentUploaderTests {
name = attachment.upload!!.name,
title = attachment.upload!!.name,
uploadState = Attachment.UploadState.Success,
extraData = attachment.extraData - EXTRA_UPLOAD_ID,
)
val result = sut.uploadAttachment(
channelType,
Expand Down
Loading