Use 'application/txt' when sending text files

This commit is contained in:
Naveen 2022-11-07 15:35:57 +05:30
parent 40a77118bf
commit 1e67cd0fdf
3 changed files with 15 additions and 2 deletions

View file

@ -901,7 +901,11 @@ class ThreadActivity : SimpleActivity() {
}
thread_attachments_recyclerview.beVisible()
val mimeType = contentResolver.getType(uri).orEmpty()
val mimeType = contentResolver.getType(uri)
if (mimeType == null) {
toast(R.string.unknown_error_occurred)
return
}
val attachment = AttachmentSelection(
id = id,
uri = uri,