mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-03-26 17:52:29 +01:00
formatting
This commit is contained in:
parent
6294c65ad6
commit
7c8f6eb239
@ -60,10 +60,12 @@ class MediaCompressor {
|
||||
|
||||
// branch into compression based on content type
|
||||
when {
|
||||
contentType?.startsWith("video", ignoreCase = true) == true
|
||||
-> compressVideo(uri, contentType, applicationContext, onReady, onError, mediaQuality)
|
||||
contentType?.startsWith("image", ignoreCase = true) == true && !contentType.contains("gif") && !contentType.contains("svg")
|
||||
-> compressImage(uri, contentType, applicationContext, onReady, onError, mediaQuality)
|
||||
contentType?.startsWith("video", ignoreCase = true) == true ->
|
||||
compressVideo(uri, contentType, applicationContext, onReady, onError, mediaQuality)
|
||||
contentType?.startsWith("image", ignoreCase = true) == true &&
|
||||
!contentType.contains("gif") &&
|
||||
!contentType.contains("svg") ->
|
||||
compressImage(uri, contentType, applicationContext, onReady, onError, mediaQuality)
|
||||
else -> onReady(uri, contentType, null)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user