diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-09-02 15:51:20 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-09-02 15:51:20 +0200 |
commit | 0ae852a6331a06b169152084719c0692db05ac5d (patch) | |
tree | 404964ed30f75dd6182245fdee4dd68934fdd485 /src/eu/siacs/conversations/ui/ChooseContactActivity.java | |
parent | 2c9b2e6bf8dedf0a2a9eaae2d4eca1a3a251b00e (diff) |
refactored share with activity
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/ui/ChooseContactActivity.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/ui/ChooseContactActivity.java b/src/eu/siacs/conversations/ui/ChooseContactActivity.java index 83b20cb9..449fc546 100644 --- a/src/eu/siacs/conversations/ui/ChooseContactActivity.java +++ b/src/eu/siacs/conversations/ui/ChooseContactActivity.java @@ -95,8 +95,13 @@ public class ChooseContactActivity extends XmppActivity { InputMethodManager.HIDE_IMPLICIT_ONLY); Intent request = getIntent(); Intent data = new Intent(); - data.putExtra("contact", contacts.get(position).getJid()); - data.putExtra("account", request.getStringExtra("account")); + ListItem mListItem = contacts.get(position); + data.putExtra("contact", mListItem.getJid()); + String account = request.getStringExtra("account"); + if (account==null && mListItem instanceof Contact) { + account = ((Contact) mListItem).getAccount().getJid(); + } + data.putExtra("account", account); data.putExtra("conversation", request.getStringExtra("conversation")); setResult(RESULT_OK, data); |