diff options
author | lookshe <github@lookshe.org> | 2016-03-25 20:04:37 +0100 |
---|---|---|
committer | lookshe <github@lookshe.org> | 2016-03-25 20:04:37 +0100 |
commit | 27c16b4b9acaad33b36145d63f6bfd7e04a3b3f1 (patch) | |
tree | 20740102fb6502dd6b130f51054a681275f44431 /src/main/java/eu/siacs/conversations/utils | |
parent | 86d16b030b46aca24e6fab38e5d34beb503a6dc7 (diff) | |
parent | 46be514b4db1cb8c17037ac6cd307078e4794a12 (diff) |
FS#169 - Merge Conversations 1.11.2 into Conversations+ dev
Diffstat (limited to 'src/main/java/eu/siacs/conversations/utils')
-rw-r--r-- | src/main/java/eu/siacs/conversations/utils/UIHelper.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/utils/UIHelper.java b/src/main/java/eu/siacs/conversations/utils/UIHelper.java index b714b895..5e4b4acd 100644 --- a/src/main/java/eu/siacs/conversations/utils/UIHelper.java +++ b/src/main/java/eu/siacs/conversations/utils/UIHelper.java @@ -220,9 +220,10 @@ public class UIHelper { } public static String getMessageDisplayName(final Message message) { + final Conversation conversation = message.getConversation(); if (message.getStatus() == Message.STATUS_RECEIVED) { final Contact contact = message.getContact(); - if (message.getConversation().getMode() == Conversation.MODE_MULTI) { + if (conversation.getMode() == Conversation.MODE_MULTI) { if (contact != null) { return contact.getDisplayName(); } else { @@ -232,10 +233,10 @@ public class UIHelper { return contact != null ? contact.getDisplayName() : ""; } } else { - if (message.getConversation().getMode() == Conversation.MODE_MULTI) { - return getDisplayedMucCounterpart(message.getConversation().getJid()); + if (conversation.getMode() == Conversation.MODE_MULTI) { + return conversation.getMucOptions().getSelf().getName(); } else { - final Jid jid = message.getConversation().getAccount().getJid(); + final Jid jid = conversation.getAccount().getJid(); return jid.hasLocalpart() ? jid.getLocalpart() : jid.toDomainJid().toString(); } } |