From 9725396582b48bb948db85eeee9f3c6ef1467a95 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Mon, 13 Jun 2022 17:41:35 +0100 Subject: [PATCH] allowing text content types to be shared via android share menu --- changelog.d/6285.feature | 1 + .../im/vector/app/features/attachments/AttachmentsHelper.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/6285.feature diff --git a/changelog.d/6285.feature b/changelog.d/6285.feature new file mode 100644 index 0000000000..ce88c13d15 --- /dev/null +++ b/changelog.d/6285.feature @@ -0,0 +1 @@ +Allow sharing text based content via android's share menu (eg .ics files) diff --git a/vector/src/main/java/im/vector/app/features/attachments/AttachmentsHelper.kt b/vector/src/main/java/im/vector/app/features/attachments/AttachmentsHelper.kt index d5f65a4aef..ffa83b608a 100644 --- a/vector/src/main/java/im/vector/app/features/attachments/AttachmentsHelper.kt +++ b/vector/src/main/java/im/vector/app/features/attachments/AttachmentsHelper.kt @@ -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()