diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-11-23 12:46:02 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-11-23 12:46:02 +0100 |
commit | 0a3d6bc6d002c3daa20140cdbe4c285cda37fd98 (patch) | |
tree | 83c64b2fea3762198e0abd8c14d2deba1b5af55b /src/main/java/de/pixart/messenger/entities | |
parent | f7fea5a35adae306326de57da22420c52bfc4517 (diff) |
show synced contacts in choose contact activity
Diffstat (limited to 'src/main/java/de/pixart/messenger/entities')
3 files changed, 4 insertions, 8 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Contact.java b/src/main/java/de/pixart/messenger/entities/Contact.java index 17a6b1099..1df6e120a 100644 --- a/src/main/java/de/pixart/messenger/entities/Contact.java +++ b/src/main/java/de/pixart/messenger/entities/Contact.java @@ -166,9 +166,6 @@ 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; } @@ -387,8 +384,8 @@ public class Contact implements ListItem, Blockable { || (this.getOption(Contact.Options.DIRTY_PUSH)); } - public boolean showInPhoneBook() { - return systemAccount != null; + public boolean showInContactList() { + return showInRoster() || getOption(Options.SYNCED_VIA_OTHER); } public void parseSubscriptionFromElement(Element item) { diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java index db6006ca3..4dcd79e9d 100644 --- a/src/main/java/de/pixart/messenger/entities/Conversation.java +++ b/src/main/java/de/pixart/messenger/entities/Conversation.java @@ -1147,9 +1147,8 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl final Contact contact = getContact(); return mode == MODE_SINGLE && !contact.isOwnServer() - && !contact.showInRoster() + && !contact.showInContactList() && !contact.isSelf() - && !contact.showInPhoneBook() && sentMessagesCount() == 0; } diff --git a/src/main/java/de/pixart/messenger/entities/Message.java b/src/main/java/de/pixart/messenger/entities/Message.java index 14d235553..730e67170 100644 --- a/src/main/java/de/pixart/messenger/entities/Message.java +++ b/src/main/java/de/pixart/messenger/entities/Message.java @@ -673,7 +673,7 @@ public class Message extends AbstractEntity { public boolean trusted() { Contact contact = this.getContact(); - return status > STATUS_RECEIVED || (contact != null && (contact.showInRoster() || contact.isSelf())); + return status > STATUS_RECEIVED || (contact != null && (contact.showInContactList() || contact.isSelf())); } public boolean fixCounterpart() { |