don't use a bookmarks name if it's empty
This commit is contained in:
parent
17c62b5991
commit
e26d842549
|
@ -52,8 +52,9 @@ public class Bookmark extends Element implements ListItem {
|
||||||
public String getDisplayName() {
|
public String getDisplayName() {
|
||||||
if (this.mJoinedConversation != null) {
|
if (this.mJoinedConversation != null) {
|
||||||
return this.mJoinedConversation.getName();
|
return this.mJoinedConversation.getName();
|
||||||
} else if (getBookmarkName() != null) {
|
} else if (getBookmarkName() != null
|
||||||
return getBookmarkName();
|
&& !getBookmarkName().trim().isEmpty()) {
|
||||||
|
return getBookmarkName().trim();
|
||||||
} else {
|
} else {
|
||||||
return this.getJid().getLocalpart();
|
return this.getJid().getLocalpart();
|
||||||
}
|
}
|
||||||
|
|
|
@ -433,8 +433,10 @@ public class Conversation extends AbstractEntity implements Blockable {
|
||||||
if (getMode() == MODE_MULTI) {
|
if (getMode() == MODE_MULTI) {
|
||||||
if (getMucOptions().getSubject() != null) {
|
if (getMucOptions().getSubject() != null) {
|
||||||
return getMucOptions().getSubject();
|
return getMucOptions().getSubject();
|
||||||
} else if (bookmark != null && bookmark.getBookmarkName() != null) {
|
} else if (bookmark != null
|
||||||
return bookmark.getBookmarkName();
|
&& bookmark.getBookmarkName() != null
|
||||||
|
&& !bookmark.getBookmarkName().trim().isEmpty()) {
|
||||||
|
return bookmark.getBookmarkName().trim();
|
||||||
} else {
|
} else {
|
||||||
String generatedName = getMucOptions().createNameFromParticipants();
|
String generatedName = getMucOptions().createNameFromParticipants();
|
||||||
if (generatedName != null) {
|
if (generatedName != null) {
|
||||||
|
|
Loading…
Reference in New Issue