aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui/ShareWithActivity.java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-06-16 14:21:22 +0200
committeriNPUTmice <daniel@gultsch.de>2014-06-16 14:21:22 +0200
commit7e8c68b698b4f00f4ee5aaae15bf2ad1679751f3 (patch)
tree2f3beff05cd59e6f76ee61e5f348073eb2f17793 /src/eu/siacs/conversations/ui/ShareWithActivity.java
parent30a0be299809613eb61a720c78f86af7bde44a94 (diff)
streamlined onpresenceselected listener
Diffstat (limited to 'src/eu/siacs/conversations/ui/ShareWithActivity.java')
-rw-r--r--src/eu/siacs/conversations/ui/ShareWithActivity.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/eu/siacs/conversations/ui/ShareWithActivity.java b/src/eu/siacs/conversations/ui/ShareWithActivity.java
index 72c20a7a5..d4d23ddf2 100644
--- a/src/eu/siacs/conversations/ui/ShareWithActivity.java
+++ b/src/eu/siacs/conversations/ui/ShareWithActivity.java
@@ -155,12 +155,17 @@ public class ShareWithActivity extends XmppActivity {
}
}
- private void share(Conversation conversation) {
+ private void share(final Conversation conversation) {
String sharedText = null;
if (isImage) {
- Uri uri = (Uri) getIntent().getParcelableExtra(Intent.EXTRA_STREAM);
- Log.d(LOGTAG,uri.toString());
- ShareWithActivity.this.xmppConnectionService.attachImageToConversation(conversation, uri,attachImageCallback);
+ final Uri uri = (Uri) getIntent().getParcelableExtra(Intent.EXTRA_STREAM);
+ selectPresence(conversation, new OnPresenceSelected() {
+ @Override
+ public void onPresenceSelected() {
+ ShareWithActivity.this.xmppConnectionService.attachImageToConversation(conversation, uri,attachImageCallback);
+ }
+ });
+
} else {
sharedText = getIntent().getStringExtra(
Intent.EXTRA_TEXT);