aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorChristian S <christian@pix-art.de>2015-07-05 18:18:57 +0200
committerChristian S <christian@pix-art.de>2015-07-05 18:18:57 +0200
commit21ce3d2d1ae18aa130999fb965c1e64a901ac7d6 (patch)
tree2a203be52f8c2d2acc85144f816fdfceebabb8de /src/main
parent7e09789d354f3d959ad56343eb7a4d81d9b885df (diff)
correct MUC nicknames
Diffstat (limited to '')
-rw-r--r--src/main/java/eu/siacs/conversations/utils/UIHelper.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/eu/siacs/conversations/utils/UIHelper.java b/src/main/java/eu/siacs/conversations/utils/UIHelper.java
index b918c0834..c44593615 100644
--- a/src/main/java/eu/siacs/conversations/utils/UIHelper.java
+++ b/src/main/java/eu/siacs/conversations/utils/UIHelper.java
@@ -221,15 +221,14 @@ public class UIHelper {
public static String getMessageDisplayName(final Message message) {
if (message.getStatus() == Message.STATUS_RECEIVED) {
+ final Contact contact = message.getContact();
if (message.getConversation().getMode() == Conversation.MODE_MULTI) {
- final Contact contact = message.getContact();
- if (message.getContact() != null) {
- return contact != null ? contact.getDisplayName() : "";
+ if (contact != null) {
+ return contact.getDisplayName();
} else {
return getDisplayedMucCounterpart(message.getCounterpart());
}
} else {
- final Contact contact = message.getContact();
return contact != null ? contact.getDisplayName() : "";
}
} else {
@@ -262,4 +261,4 @@ public class UIHelper {
body = body.replace("?","").replace("¿","");
return LOCATION_QUESTIONS.contains(body);
}
-}
+} \ No newline at end of file