Video compression error logging: code style

This commit is contained in:
SpiritCroc 2021-11-01 14:46:55 +01:00
parent 076820bb10
commit c568595817
1 changed files with 4 additions and 4 deletions

View File

@ -188,9 +188,6 @@ internal class UploadContentWorker(val context: Context, params: WorkerParameter
}
})
.let { videoCompressionResult ->
if (videoCompressionResult is VideoCompressionResult.CompressionFailed) {
videoCompressionResult.failure.printStackTrace()
}
when (videoCompressionResult) {
is VideoCompressionResult.Success -> {
val compressedFile = videoCompressionResult.compressedFile
@ -217,8 +214,11 @@ internal class UploadContentWorker(val context: Context, params: WorkerParameter
.also { filesToDelete.add(it) }
}
VideoCompressionResult.CompressionNotNeeded,
VideoCompressionResult.CompressionCancelled,
VideoCompressionResult.CompressionCancelled -> {
workingFile
}
is VideoCompressionResult.CompressionFailed -> {
Timber.e(videoCompressionResult.failure, "Video compression failed")
workingFile
}
}