do not show 'block stranger' snackbar in empty conversations

This commit is contained in:
Daniel Gultsch 2017-03-08 11:54:52 +01:00
parent 233ee8a51c
commit a3b51f7654
1 changed files with 3 additions and 1 deletions

View File

@ -1054,7 +1054,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.isWithStranger() && !conversation.isBlocked()) {
} else if (conversation.countMessages() != 0
&& !conversation.isBlocked()
&& conversation.isWithStranger()) {
showSnackbar(R.string.received_message_from_stranger,R.string.block, mBlockClickListener);
} else {
hideSnackbar();