Merge pull request #6296 from vector-im/feature/adm/attach-ics

Allow sharing text mimetype content via android's share menu
This commit is contained in:
Adam Brown 2022-06-16 09:33:21 +01:00 committed by GitHub
commit baae7375af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
changelog.d/6285.feature Normal file
View file

@ -0,0 +1 @@
Allow sharing text based content via android's share menu (eg .ics files)

View file

@ -214,7 +214,7 @@ class AttachmentsHelper(val context: Context, val callback: Callback) : Restorab
it.toContentAttachmentData()
}
)
} else if (type.startsWith("application") || type.startsWith("file") || type.startsWith("*")) {
} else if (type.startsWith("application") || type.startsWith("file") || type.startsWith("text") || type.startsWith("*")) {
callback.onContentAttachmentsReady(
MultiPicker.get(MultiPicker.FILE).getIncomingFiles(context, intent).map {
it.toContentAttachmentData()