diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-03-23 23:12:16 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-03-23 23:12:16 +0100 |
commit | a995032d0bc2dee130f8d14a8c766994aec39385 (patch) | |
tree | 48c3f5421bdc91ce624ecad8752567b39c916f0c /src/main/java/de/pixart/messenger/ui | |
parent | 6b7e4651b2b4c23ee44ad23817b1be63db445bf6 (diff) |
do not show block stranger snackbar when blocking command is unavailable
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationFragment.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java index aeb906b9b..7d7282464 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java @@ -1034,6 +1034,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa private void updateSnackBar(final Conversation conversation) { final Account account = conversation.getAccount(); + final XmppConnection connection = account.getXmppConnection(); final Contact contact = conversation.getContact(); final int mode = conversation.getMode(); if (account.getStatus() == Account.State.DISABLED) { @@ -1089,7 +1090,9 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa && (conversation.getOtrSession().getSessionStatus() == SessionStatus.ENCRYPTED) && (!conversation.isOtrFingerprintVerified())) { showSnackbar(R.string.unknown_otr_fingerprint, R.string.verify, clickToVerify); - } else if (conversation.countMessages() != 0 + } else if (connection != null + && connection.getFeatures().blocking() + && conversation.countMessages() != 0 && !conversation.isBlocked() && conversation.isWithStranger()) { showSnackbar(R.string.received_message_from_stranger, R.string.block, mBlockClickListener); |