fixed npe when conversation in multi mode had jid w/o local part
This commit is contained in:
parent
71461543a3
commit
5170e526c8
|
@ -484,7 +484,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public CharSequence getName() {
|
public @NonNull CharSequence getName() {
|
||||||
if (getMode() == MODE_MULTI) {
|
if (getMode() == MODE_MULTI) {
|
||||||
final String subject = getMucOptions().getSubject();
|
final String subject = getMucOptions().getSubject();
|
||||||
final Bookmark bookmark = getBookmark();
|
final Bookmark bookmark = getBookmark();
|
||||||
|
@ -498,7 +498,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
|
||||||
if (printableValue(generatedName)) {
|
if (printableValue(generatedName)) {
|
||||||
return generatedName;
|
return generatedName;
|
||||||
} else {
|
} else {
|
||||||
return getJid().getLocal();
|
return contactJid.getLocal() != null ? contactJid.getLocal() : contactJid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (isWithStranger()) {
|
} else if (isWithStranger()) {
|
||||||
|
|
Loading…
Reference in New Issue