aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-03-09 20:42:23 +0100
committerChristian Schneppe <christian@pix-art.de>2017-03-09 20:42:23 +0100
commit9ce2843c281c3eadaee45a6dcee50bb5b6fdd429 (patch)
treec156014b78afc2c1843aa8439620fea0b4d235a2
parent251be239424f95eac0ddc9db5a5303e8b40f217e (diff)
do not show 'block stranger' snackbar in empty conversations
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java4
1 files changed, 3 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 18c3cb5cf..8f42e8d32 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
@@ -1089,7 +1089,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();