Fix a regression with video size

This commit is contained in:
Benoit Marty 2021-05-01 14:14:59 +02:00 committed by Benoit Marty
parent e510de1ccc
commit d7cbae7c47
1 changed files with 3 additions and 2 deletions

View File

@ -389,8 +389,9 @@ internal class UploadContentWorker(val context: Context, params: WorkerParameter
videoInfo = videoInfo?.copy( videoInfo = videoInfo?.copy(
thumbnailUrl = if (thumbnailEncryptedFileInfo == null) thumbnailUrl else null, thumbnailUrl = if (thumbnailEncryptedFileInfo == null) thumbnailUrl else null,
thumbnailFile = thumbnailEncryptedFileInfo?.copy(url = thumbnailUrl), thumbnailFile = thumbnailEncryptedFileInfo?.copy(url = thumbnailUrl),
width = newAttachmentAttributes?.newWidth ?: videoInfo.width, // FIXME for now, the video size is not updated, but if it was, this code is not working.
height = newAttachmentAttributes?.newHeight ?: videoInfo.height, // width = newAttachmentAttributes?.newWidth ?: videoInfo.width,
// height = newAttachmentAttributes?.newHeight ?: videoInfo.height,
size = newAttachmentAttributes?.newFileSize ?: videoInfo.size size = newAttachmentAttributes?.newFileSize ?: videoInfo.size
) )
) )