Video compression error logging: code style
This commit is contained in:
parent
076820bb10
commit
c568595817
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue