diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2014-05-19 15:15:09 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2014-05-19 15:15:09 +0200 |
commit | 993477cd8301e1a9a19ccdc10008bc23928faf08 (patch) | |
tree | 06f7f52d55546676eaf4e894a58fe79423ab3ef6 /src/eu/siacs/conversations/entities/Conversation.java | |
parent | 590e2403ab6d9d8f3b0158bf5218802216e9cd50 (diff) |
reworked roster/contact handling. might break some stuff. not sycing to disk yet
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/entities/Conversation.java | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/eu/siacs/conversations/entities/Conversation.java b/src/eu/siacs/conversations/entities/Conversation.java index 88d6279e..e61537da 100644 --- a/src/eu/siacs/conversations/entities/Conversation.java +++ b/src/eu/siacs/conversations/entities/Conversation.java @@ -49,7 +49,6 @@ public class Conversation extends AbstractEntity { private transient List<Message> messages = null; private transient Account account = null; - private transient Contact contact; private transient SessionImpl otrSession; @@ -129,19 +128,13 @@ public class Conversation extends AbstractEntity { public String getName(boolean useSubject) { if ((getMode() == MODE_MULTI) && (getMucOptions().getSubject() != null) && useSubject) { return getMucOptions().getSubject(); - } else if (this.contact != null) { - return this.contact.getDisplayName(); } else { - return this.name; + return this.getContact().getDisplayName(); } } public String getProfilePhotoString() { - if (this.contact == null) { - return null; - } else { - return this.contact.getProfilePhoto(); - } + return this.getContact().getProfilePhoto(); } public String getAccountUuid() { @@ -153,14 +146,7 @@ public class Conversation extends AbstractEntity { } public Contact getContact() { - return this.contact; - } - - public void setContact(Contact contact) { - this.contact = contact; - if (contact != null) { - this.contactUuid = contact.getUuid(); - } + return this.account.getRoster().getContact(this.contactJid); } public void setAccount(Account account) { |