diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-09-11 21:14:56 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-09-11 21:14:56 +0200 |
commit | c27a3d22e43385314c971ef211c232c3d2a74570 (patch) | |
tree | de2e3a52ead349349a52cb0b3bdebc0b958a1994 /src/main | |
parent | 2af9e34b6477aa34d0587d3bb1f3b7f15b117cff (diff) |
do not show 'delete contact' for phone contacts. do not treat as stranger
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/Conversation.java | 1 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/StartConversationActivity.java | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java index cc995a30b..1e5224489 100644 --- a/src/main/java/de/pixart/messenger/entities/Conversation.java +++ b/src/main/java/de/pixart/messenger/entities/Conversation.java @@ -1135,6 +1135,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl && !contact.isOwnServer() && !contact.showInRoster() && !contact.isSelf() + && !contact.showInPhoneBook() && sentMessagesCount() == 0; } diff --git a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java index 663905b7d..f9d373b27 100644 --- a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java @@ -1071,9 +1071,11 @@ public class StartConversationActivity extends XmppActivity implements XmppConne final Contact contact = (Contact) activity.contacts.get(acmi.position); final MenuItem blockUnblockItem = menu.findItem(R.id.context_contact_block_unblock); final MenuItem showContactDetailsItem = menu.findItem(R.id.context_contact_details); + final MenuItem deleteContactMenuItem = menu.findItem(R.id.context_delete_contact); if (contact.isSelf()) { showContactDetailsItem.setVisible(false); } + deleteContactMenuItem.setVisible(contact.showInRoster()); XmppConnection xmpp = contact.getAccount().getXmppConnection(); if (xmpp != null && xmpp.getFeatures().blocking() && !contact.isSelf()) { if (contact.isBlocked()) { |