From 56b4ac17517c37afa09c65239687a47c1a7c0f5b Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Sun, 9 Nov 2014 19:06:43 +0100 Subject: [PATCH] use isBareJid instead of getResourcePart().isEmpty() --- .../java/eu/siacs/conversations/ui/ConversationFragment.java | 2 +- .../java/eu/siacs/conversations/ui/adapter/MessageAdapter.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 5d133e877..d2ba6f519 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -280,7 +280,7 @@ public class ConversationFragment extends Fragment { if (message.getStatus() <= Message.STATUS_RECEIVED) { if (message.getConversation().getMode() == Conversation.MODE_MULTI) { if (message.getCounterpart() != null) { - if (!message.getCounterpart().getResourcepart().isEmpty()) { + if (!message.getCounterpart().isBareJid()) { highlightInConference(message.getCounterpart().getResourcepart()); } else { highlightInConference(message.getCounterpart().toString()); diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java index 16239ec82..3ebb93908 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java @@ -304,7 +304,7 @@ public class MessageAdapter extends ArrayAdapter { private String getDisplayedMucCounterpart(final Jid counterpart) { if (counterpart==null) { return ""; - } else if (!counterpart.getResourcepart().isEmpty()) { + } else if (!counterpart.isBareJid()) { return counterpart.getResourcepart(); } else { return counterpart.toString();