diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-11-27 20:04:21 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-11-27 20:04:21 +0100 |
commit | 2b2664bd4239826388eae3da4119f9d60da7cb4f (patch) | |
tree | 4e269228ae1c68a80b62eb30ec0d8f7b69dea898 | |
parent | 7c82eb476582870f08d26a6b4fcf89b91ad6a015 (diff) |
fix bug with warn message for unencrypted chats
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationFragment.java | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java index c30ccd92a..e0f6e2157 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java @@ -1163,14 +1163,20 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa && !conversation.isBlocked() && conversation.isWithStranger()) { showSnackbar(R.string.received_message_from_stranger, R.string.block, mBlockClickListener); - } else if (activity.xmppConnectionService.warnUnecryptedChat() && (conversation.getNextEncryption() == Message.ENCRYPTION_NONE - && ((mode == Conversation.MODE_SINGLE) - && ((Config.supportOmemo() && conversation.getAccount().getAxolotlService().isConversationAxolotlCapable(conversation)) - || (Config.supportOpenPgp() && account.isPgpDecryptionServiceConnected()) || Config.supportOtr())) - || ((mode == Conversation.MODE_MULTI && conversation.getMucOptions().membersOnly() && conversation.getMucOptions().nonanonymous()) - && (Config.supportOmemo() && conversation.getAccount().getAxolotlService().isConversationAxolotlCapable(conversation) - || (Config.supportOpenPgp() && account.isPgpDecryptionServiceConnected()))))) { - showSnackbar(R.string.conversation_unencrypted_hint, R.string.ok, mHideUnencryptionHint, null); + } else if (activity.xmppConnectionService.warnUnecryptedChat()) { + if ((mode == Conversation.MODE_SINGLE) && (conversation.getNextEncryption() == Message.ENCRYPTION_NONE && + ((Config.supportOmemo() && conversation.getAccount().getAxolotlService().isConversationAxolotlCapable(conversation)) || + (Config.supportOpenPgp() && account.isPgpDecryptionServiceConnected()) || + Config.supportOtr()))) { + showSnackbar(R.string.conversation_unencrypted_hint, R.string.ok, mHideUnencryptionHint, null); + } else if ((mode == Conversation.MODE_MULTI && conversation.getMucOptions().membersOnly() && conversation.getMucOptions().nonanonymous()) && + (conversation.getNextEncryption() == Message.ENCRYPTION_NONE && + ((Config.supportOmemo() && conversation.getAccount().getAxolotlService().isConversationAxolotlCapable(conversation)) || + (Config.supportOpenPgp() && account.isPgpDecryptionServiceConnected())))) { + showSnackbar(R.string.conversation_unencrypted_hint, R.string.ok, mHideUnencryptionHint, null); + } else { + hideSnackbar(); + } } else { hideSnackbar(); } |