mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-04-08 20:08:06 +02:00
fixing type
This commit is contained in:
parent
981d93f2fc
commit
b8246d7cd4
@ -224,7 +224,7 @@ open class EditPostViewModel : ViewModel() {
|
||||
isUploadingImage = false
|
||||
onError(stringRes(context, R.string.failed_to_upload_media_no_details), stringRes(context, it))
|
||||
},
|
||||
mediaQaulity = CompressorQuality.LOW,
|
||||
mediaQuality = CompressorQuality.LOW,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ open class NewMediaModel : ViewModel() {
|
||||
uploadingDescription.value = null
|
||||
onError(stringRes(context, R.string.error_when_compressing_media, it))
|
||||
},
|
||||
mediaQaulity = CompressorQuality.LOW,
|
||||
mediaQuality = CompressorQuality.LOW,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -910,7 +910,7 @@ open class NewPostViewModel : ViewModel() {
|
||||
isUploadingImage = false
|
||||
onError(stringRes(context, R.string.failed_to_upload_media_no_details), stringRes(context, it))
|
||||
},
|
||||
mediaQaulity = CompressorQuality.LOW,
|
||||
mediaQuality = CompressorQuality.LOW,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -212,7 +212,7 @@ class NewUserMetadataViewModel : ViewModel() {
|
||||
|
||||
onError(stringRes(context, R.string.error_when_compressing_media), stringRes(context, it))
|
||||
},
|
||||
mediaQaulity = CompressorQuality.MEDIUM,
|
||||
mediaQuality = CompressorQuality.MEDIUM,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -46,13 +46,13 @@ class MediaCompressor {
|
||||
applicationContext: Context,
|
||||
onReady: (Uri, String?, Long?) -> Unit,
|
||||
onError: (Int) -> Unit,
|
||||
mediaQaulity: CompressorQuality?,
|
||||
mediaQuality: CompressorQuality?,
|
||||
) {
|
||||
checkNotInMainThread()
|
||||
|
||||
if (contentType?.startsWith("video", true) == true) {
|
||||
val videoQuality =
|
||||
when (mediaQaulity) {
|
||||
when (mediaQuality) {
|
||||
CompressorQuality.VERY_LOW -> VideoQuality.VERY_LOW
|
||||
CompressorQuality.LOW -> VideoQuality.LOW
|
||||
CompressorQuality.MEDIUM -> VideoQuality.MEDIUM
|
||||
@ -121,7 +121,7 @@ class MediaCompressor {
|
||||
!contentType.contains("svg")
|
||||
) {
|
||||
val imageQuality =
|
||||
when (mediaQaulity) {
|
||||
when (mediaQuality) {
|
||||
CompressorQuality.VERY_LOW -> 40
|
||||
CompressorQuality.LOW -> 50
|
||||
CompressorQuality.MEDIUM -> 60
|
||||
|
Loading…
x
Reference in New Issue
Block a user