aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui/ConversationActivity.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-05-19 15:15:09 +0200
committerDaniel Gultsch <daniel@gultsch.de>2014-05-19 15:15:09 +0200
commit993477cd8301e1a9a19ccdc10008bc23928faf08 (patch)
tree06f7f52d55546676eaf4e894a58fe79423ab3ef6 /src/eu/siacs/conversations/ui/ConversationActivity.java
parent590e2403ab6d9d8f3b0158bf5218802216e9cd50 (diff)
reworked roster/contact handling. might break some stuff. not sycing to disk yet
Diffstat (limited to 'src/eu/siacs/conversations/ui/ConversationActivity.java')
-rw-r--r--src/eu/siacs/conversations/ui/ConversationActivity.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java
index c3626ee1..346cd2fc 100644
--- a/src/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/eu/siacs/conversations/ui/ConversationActivity.java
@@ -474,10 +474,11 @@ public class ConversationActivity extends XmppActivity {
break;
case R.id.action_contact_details:
Contact contact = this.getSelectedConversation().getContact();
- if (contact != null) {
+ if (contact.getOption(Contact.Options.IN_ROSTER)) {
Intent intent = new Intent(this, ContactDetailsActivity.class);
intent.setAction(ContactDetailsActivity.ACTION_VIEW_CONTACT);
- intent.putExtra("uuid", contact.getUuid());
+ intent.putExtra("account", this.getSelectedConversation().getAccount().getJid());
+ intent.putExtra("contact",contact.getJid());
startActivity(intent);
} else {
showAddToRosterDialog(getSelectedConversation());
@@ -874,8 +875,7 @@ public class ConversationActivity extends XmppActivity {
public void onClick(DialogInterface dialog, int which) {
String jid = conversation.getContactJid();
Account account = getSelectedConversation().getAccount();
- String name = jid.split("@")[0];
- Contact contact = new Contact(account, name, jid, null);
+ Contact contact = account.getRoster().getContact(jid);
xmppConnectionService.createContact(contact);
}
});