Skip to content

Commit

Permalink
Use interface field
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarty committed Jun 29, 2021
1 parent 0d02a19 commit 7f70a03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ internal class DefaultSendService @AssistedInject constructor(
// The image has not yet been sent
val attachmentData = ContentAttachmentData(
size = messageContent.info!!.size,
mimeType = messageContent.info.mimeType!!,
mimeType = messageContent.mimeType,
width = messageContent.info.width.toLong(),
height = messageContent.info.height.toLong(),
name = messageContent.body,
Expand All @@ -169,7 +169,7 @@ internal class DefaultSendService @AssistedInject constructor(
is MessageFileContent -> {
val attachmentData = ContentAttachmentData(
size = messageContent.info!!.size,
mimeType = messageContent.info.mimeType!!,
mimeType = messageContent.mimeType,
name = messageContent.getFileName(),
queryUri = Uri.parse(messageContent.url),
type = ContentAttachmentData.Type.FILE
Expand All @@ -181,7 +181,7 @@ internal class DefaultSendService @AssistedInject constructor(
val attachmentData = ContentAttachmentData(
size = messageContent.audioInfo?.size ?: 0,
duration = messageContent.audioInfo?.duration?.toLong() ?: 0L,
mimeType = messageContent.audioInfo?.mimeType,
mimeType = messageContent.mimeType,
name = messageContent.body,
queryUri = Uri.parse(messageContent.url),
type = ContentAttachmentData.Type.AUDIO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ class MessageItemFactory @Inject constructor(
.leftGuideline(avatarSizeProvider.leftGuideline)
.imageContentRenderer(imageContentRenderer)
.contentUploadStateTrackerBinder(contentUploadStateTrackerBinder)
.playable(messageContent.info?.mimeType == MimeTypes.Gif)
.playable(messageContent.mimeType == MimeTypes.Gif)
.highlighted(highlight)
.mediaData(data)
.apply {
Expand Down

0 comments on commit 7f70a03

Please sign in to comment.