diff options
author | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-02-09 14:10:52 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel.gultsch@rwth-aachen.de> | 2014-02-09 14:10:52 +0100 |
commit | c6440aab12460490ef8e9167eac0b515e04f1cdf (patch) | |
tree | 28c4a760cb3d0edc187bd574466455f531034caf /src/de/gultsch/chat/ui | |
parent | 892f565a30446b972586952abd27ac455cf3ca99 (diff) |
carbons
Diffstat (limited to 'src/de/gultsch/chat/ui')
-rw-r--r-- | src/de/gultsch/chat/ui/DialogContactDetails.java | 16 | ||||
-rw-r--r-- | src/de/gultsch/chat/ui/NewConversationActivity.java | 5 |
2 files changed, 13 insertions, 8 deletions
diff --git a/src/de/gultsch/chat/ui/DialogContactDetails.java b/src/de/gultsch/chat/ui/DialogContactDetails.java index 51819399..58e5f67f 100644 --- a/src/de/gultsch/chat/ui/DialogContactDetails.java +++ b/src/de/gultsch/chat/ui/DialogContactDetails.java @@ -38,13 +38,15 @@ public class DialogContactDetails extends DialogFragment { boolean subscriptionSend = false; boolean subscriptionReceive = false; - if (contact.getSubscription().equals("both")) { - subscriptionReceive = true; - subscriptionSend = true; - } else if (contact.getSubscription().equals("from")) { - subscriptionSend = true; - } else if (contact.getSubscription().equals("to")) { - subscriptionReceive = true; + if (contact.getSubscription()!=null) { + if (contact.getSubscription().equals("both")) { + subscriptionReceive = true; + subscriptionSend = true; + } else if (contact.getSubscription().equals("from")) { + subscriptionSend = true; + } else if (contact.getSubscription().equals("to")) { + subscriptionReceive = true; + } } switch (contact.getMostAvailableStatus()) { diff --git a/src/de/gultsch/chat/ui/NewConversationActivity.java b/src/de/gultsch/chat/ui/NewConversationActivity.java index 4e2628a6..2fb14008 100644 --- a/src/de/gultsch/chat/ui/NewConversationActivity.java +++ b/src/de/gultsch/chat/ui/NewConversationActivity.java @@ -181,7 +181,9 @@ public class NewConversationActivity extends XmppActivity { }); accountChooser.create().show(); } else { - clickedContact.setAccount(accounts.get(0)); + if (clickedContact.getAccount()==null) { + clickedContact.setAccount(accounts.get(0)); + } showIsMucDialogIfNeeded(clickedContact); } } @@ -226,6 +228,7 @@ public class NewConversationActivity extends XmppActivity { } public void startConversation(Contact contact, Account account, boolean muc) { + Log.d("xmppService","starting conversation for account:"+account.getJid()+" and contact:"+contact.getJid()); Conversation conversation = xmppConnectionService .findOrCreateConversation(account, contact, muc); |