allowing text content types to be shared via android share menu

This commit is contained in:
Adam Brown 2022-06-13 17:41:35 +01:00
parent 01c70e165d
commit 9725396582
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()