aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu')
-rw-r--r--src/main/java/eu/siacs/conversations/parser/MessageParser.java7
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java2
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationActivity.java11
3 files changed, 8 insertions, 12 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
index ce2103dc..e2028c7b 100644
--- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
@@ -319,12 +319,7 @@ public class MessageParser extends AbstractParser implements
}
} else if (packet.hasChild("x", "jabber:x:conference")) {
Element x = packet.findChild("x", "jabber:x:conference");
- Jid jid;
- try {
- jid = Jid.fromString(x.getAttribute("jid"));
- } catch (InvalidJidException e) {
- jid = null;
- }
+ Jid jid = x.getAttributeAsJid("jid");
String password = x.getAttribute("password");
if (jid != null) {
Conversation conversation = mXmppConnectionService
diff --git a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
index 27aa6976..6744acb1 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConferenceDetailsActivity.java
@@ -254,7 +254,7 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
protected void startConversation(User user) {
if (user.getJid() != null) {
- Conversation conversation = xmppConnectionService.findOrCreateConversation(this.mConversation.getAccount(),user.getJid(),false);
+ Conversation conversation = xmppConnectionService.findOrCreateConversation(this.mConversation.getAccount(),user.getJid().toBareJid(),false);
switchToConversation(conversation);
}
}
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
index 0277f155..0f9761e5 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
@@ -235,15 +235,16 @@ public class ConversationActivity extends XmppActivity implements
}
private void updateActionBarTitle(boolean titleShouldBeName) {
- ActionBar ab = getActionBar();
+ final ActionBar ab = getActionBar();
+ final Conversation conversation = getSelectedConversation();
if (ab != null) {
- if (titleShouldBeName) {
+ if (titleShouldBeName && conversation != null) {
ab.setDisplayHomeAsUpEnabled(true);
ab.setHomeButtonEnabled(true);
- if (getSelectedConversation().getMode() == Conversation.MODE_SINGLE || useSubjectToIdentifyConference()) {
- ab.setTitle(getSelectedConversation().getName());
+ if (conversation.getMode() == Conversation.MODE_SINGLE || useSubjectToIdentifyConference()) {
+ ab.setTitle(conversation.getName());
} else {
- ab.setTitle(getSelectedConversation().getContactJid().toBareJid().toString());
+ ab.setTitle(conversation.getContactJid().toBareJid().toString());
}
} else {
ab.setDisplayHomeAsUpEnabled(false);