From 36bc5854b3a5ab833470e48b5c27ddc3e113236b Mon Sep 17 00:00:00 2001 From: Philipp Heckel Date: Sun, 13 Feb 2022 13:52:55 -0500 Subject: [PATCH] Support all images --- app/src/main/java/io/heckel/ntfy/ui/ShareActivity.kt | 5 +++-- fastlane/metadata/android/en-US/changelog/22.txt | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/heckel/ntfy/ui/ShareActivity.kt b/app/src/main/java/io/heckel/ntfy/ui/ShareActivity.kt index 04a42ad..ababf3b 100644 --- a/app/src/main/java/io/heckel/ntfy/ui/ShareActivity.kt +++ b/app/src/main/java/io/heckel/ntfy/ui/ShareActivity.kt @@ -156,10 +156,11 @@ class ShareActivity : AppCompatActivity() { // Incoming intent val intent = intent ?: return + val type = intent.type ?: return if (intent.action != Intent.ACTION_SEND) return - if (intent.type == "text/plain") { + if (type == "text/plain") { handleSendText(intent) - } else if (supportedImage(intent.type)) { + } else if (type.startsWith("image/")) { handleSendImage(intent) } else { handleSendFile(intent) diff --git a/fastlane/metadata/android/en-US/changelog/22.txt b/fastlane/metadata/android/en-US/changelog/22.txt index 39095aa..a4b0373 100644 --- a/fastlane/metadata/android/en-US/changelog/22.txt +++ b/fastlane/metadata/android/en-US/changelog/22.txt @@ -1,6 +1,7 @@ Features: -* Dark theme: Improvements around style and contrast (#119, thanks @kzshantonu for reporting) * Automatically delete notifications (#71, thanks @arjan-s for reporting) +* Share to topic feature (#131, thanks u/emptymatrix for reporting) +* Dark theme: Improvements around style and contrast (#119, thanks @kzshantonu for reporting) Bug fixes: * Do not attempt to download attachments if they are already expired (#135)