diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-09-11 21:10:33 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-09-11 21:10:33 +0200 |
commit | 8c6030e0bf8e90a3ba67dbc6155adb2ff9000d1c (patch) | |
tree | c97423f39aae21929b93fe7f96c8d82788eafb61 /src/main/java/de/pixart/messenger/entities | |
parent | bcafe9a16ec636256b6b3a62732b78f66ea136c2 (diff) |
show jids from address book in Start Conversation screen if only one account is used
Diffstat (limited to 'src/main/java/de/pixart/messenger/entities')
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/Contact.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Contact.java b/src/main/java/de/pixart/messenger/entities/Contact.java index 40bd69976..6d07c5901 100644 --- a/src/main/java/de/pixart/messenger/entities/Contact.java +++ b/src/main/java/de/pixart/messenger/entities/Contact.java @@ -159,6 +159,9 @@ public class Contact implements ListItem, Blockable { if (isBlocked()) { tags.add(new Tag(context.getString(R.string.blocked), 0xff2e2f3b, 0)); } + if (showInPhoneBook()) { + tags.add(new Tag(context.getString(R.string.phone_book), 0xFF1E88E5, 0)); + } return tags; } @@ -384,6 +387,10 @@ public class Contact implements ListItem, Blockable { || (this.getOption(Contact.Options.DIRTY_PUSH)); } + public boolean showInPhoneBook() { + return systemAccount != null && !systemAccount.trim().isEmpty(); + } + public void parseSubscriptionFromElement(Element item) { String ask = item.getAttribute("ask"); String subscription = item.getAttribute("subscription"); |