Use Long for size like for the other models (FileInfo, AudioInfo, VideoInfo)
This commit is contained in:
parent
bcf6dcbf70
commit
c502e971a1
|
@ -40,7 +40,7 @@ data class ImageInfo(
|
|||
/**
|
||||
* Size of the image in bytes.
|
||||
*/
|
||||
@Json(name = "size") val size: Int = 0,
|
||||
@Json(name = "size") val size: Long = 0,
|
||||
|
||||
/**
|
||||
* Metadata about the image referred to in thumbnail_url.
|
||||
|
|
|
@ -392,7 +392,7 @@ internal class UploadContentWorker(val context: Context, params: WorkerParameter
|
|||
info = info?.copy(
|
||||
width = newAttachmentAttributes?.newWidth ?: info.width,
|
||||
height = newAttachmentAttributes?.newHeight ?: info.height,
|
||||
size = newAttachmentAttributes?.newFileSize?.toInt() ?: info.size
|
||||
size = newAttachmentAttributes?.newFileSize ?: info.size
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ internal class DefaultSendService @AssistedInject constructor(
|
|||
is MessageImageContent -> {
|
||||
// The image has not yet been sent
|
||||
val attachmentData = ContentAttachmentData(
|
||||
size = messageContent.info!!.size.toLong(),
|
||||
size = messageContent.info!!.size,
|
||||
mimeType = messageContent.info.mimeType!!,
|
||||
width = messageContent.info.width.toLong(),
|
||||
height = messageContent.info.height.toLong(),
|
||||
|
|
|
@ -244,7 +244,7 @@ internal class LocalEchoEventFactory @Inject constructor(
|
|||
mimeType = attachment.getSafeMimeType(),
|
||||
width = width?.toInt() ?: 0,
|
||||
height = height?.toInt() ?: 0,
|
||||
size = attachment.size.toInt()
|
||||
size = attachment.size
|
||||
),
|
||||
url = attachment.queryUri.toString()
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue