feat: add settings option to customise the MMS file size limit
This commit is contained in:
parent
b317507370
commit
c3c2ce4ee3
27 changed files with 246 additions and 8 deletions
|
|
@ -602,12 +602,12 @@ class ThreadActivity : SimpleActivity() {
|
|||
val attachmentView = addAttachmentView(originalUriString, uri)
|
||||
val mimeType = contentResolver.getType(uri) ?: return
|
||||
|
||||
if (mimeType.isImageMimeType()) {
|
||||
if (mimeType.isImageMimeType() && config.mmsFileSizeLimit != FILE_SIZE_NONE) {
|
||||
val selection = attachmentSelections[originalUriString]
|
||||
attachmentSelections[originalUriString] = selection!!.copy(isPending = true)
|
||||
checkSendMessageAvailability()
|
||||
attachmentView.thread_attachment_progress.beVisible()
|
||||
imageCompressor.compressImage(uri, IMAGE_COMPRESS_SIZE) { compressedUri ->
|
||||
imageCompressor.compressImage(uri, config.mmsFileSizeLimit) { compressedUri ->
|
||||
runOnUiThread {
|
||||
if (compressedUri != null) {
|
||||
attachmentSelections[originalUriString] = AttachmentSelection(compressedUri, false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue