From 7f2eda535b396ee76f25f42c41858b28dfd7a1a4 Mon Sep 17 00:00:00 2001 From: scoute-dich Date: Thu, 14 Apr 2016 22:01:54 +0200 Subject: [PATCH] Share Activity (only text) --- .../dfa/diaspora_android/activity/ShareActivity.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/github/dfa/diaspora_android/activity/ShareActivity.java b/app/src/main/java/com/github/dfa/diaspora_android/activity/ShareActivity.java index 5357ca99..1aed3ed1 100644 --- a/app/src/main/java/com/github/dfa/diaspora_android/activity/ShareActivity.java +++ b/app/src/main/java/com/github/dfa/diaspora_android/activity/ShareActivity.java @@ -208,14 +208,10 @@ public class ShareActivity extends MainActivity { Intent intent = getIntent(); String action = intent.getAction(); String type = intent.getType(); - String sharedSubject = intent.getStringExtra(Intent.EXTRA_SUBJECT); if (Intent.ACTION_SEND.equals(action) && type != null) { if ("text/plain".equals(type)) { - handleSendText(intent); // Handle text being sent - } else if (sharedSubject != null) { - // TODO difference of ALL intents with and without EXTRA_SUBJECT - handleSendSubject(intent); // Handle intent with extra_subject being sent + handleSendText(intent); // Handle text being sent TODO difference of "text/plain" intents with and without EXTRA_SUBJECT } else if (type.startsWith("image/")) { // TODO Handle single image being sent handleSendImage(intent); @@ -252,6 +248,7 @@ public class ShareActivity extends MainActivity { } } + // TODO difference of "text/plain" intents with and without EXTRA_SUBJECT void handleSendSubject(Intent intent) { final String sharedText = intent.getStringExtra(Intent.EXTRA_TEXT); final String sharedSubject = intent.getStringExtra(Intent.EXTRA_SUBJECT);