mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 05:31:21 +03:00
Use Long for size like for the other models (FileInfo, AudioInfo, VideoInfo)
This commit is contained in:
parent
bcf6dcbf70
commit
c502e971a1
4 changed files with 4 additions and 4 deletions
|
@ -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 a new issue