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