Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ internal class ChannelMediaAttachmentsPreviewViewModelTest {
val attachment = randomAttachment(
// Less than 10MB
fileSize = positiveRandomInt(maxInt = (10 * 1024 * 1024) - 1),
assetUrl = null,
imageUrl = null,
thumbUrl = null,
)
val shareError = Error.GenericError(message = randomString())
val sut = Fixture()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,12 @@ public object PreviewMessageData {
type = "image",
mimeType = "image/jpeg",
imageUrl = "https://example.com/image1.jpg",
thumbUrl = "https://example.com/thumb1.jpg",
),
Attachment(
name = "video1.mp4",
fileSize = 2000000,
type = "video",
mimeType = "video/mp4",
imageUrl = "https://example.com/image1.jpg",
thumbUrl = "https://example.com/thumb1.jpg",
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package io.getstream.chat.android.ui.common.state.channel.attachments

import io.getstream.chat.android.models.Attachment
import io.getstream.chat.android.models.Message
import io.getstream.chat.android.ui.common.utils.extensions.getDisplayableName
import io.getstream.chat.android.ui.common.utils.extensions.imagePreviewUrl

/**
Expand Down Expand Up @@ -61,7 +60,7 @@ public sealed interface ChannelAttachmentsViewState {
* Returns the unique identifier for the item.
*/
public val id: String =
"${message.identifierHash()}-${attachment.getDisplayableName() ?: attachment.imagePreviewUrl}"
"${message.identifierHash()}-${attachment.imagePreviewUrl}"
Comment thread
amanna13 marked this conversation as resolved.
}
}

Expand Down
Loading