improve OTR warning

This commit is contained in:
Christian Schneppe 2020-05-12 20:59:46 +02:00
parent b3b12b9e04
commit dd2d12d28e
No known key found for this signature in database
GPG key ID: F30B8D686B44D87E

View file

@ -2637,6 +2637,9 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
} else if (mode == Conversation.MODE_SINGLE
&& conversation.smpRequested()) {
showSnackbar(R.string.smp_requested, R.string.verify, this.mAnswerSmpClickListener);
} else if (mode == Conversation.MODE_SINGLE
&& conversation.getNextEncryption() == Message.ENCRYPTION_OTR) {
showSnackbar(R.string.otr_warning, R.string.readmore, OTRwarning);
} else if (mode == Conversation.MODE_SINGLE
&& conversation.hasValidOtrSession()
&& (conversation.getOtrSession().getSessionStatus() == SessionStatus.ENCRYPTED)
@ -2660,8 +2663,6 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
} else {
hideSnackbar();
}
} else if (conversation.getNextEncryption() == Message.ENCRYPTION_OTR) {
showSnackbar(R.string.otr_warning, R.string.readmore, OTRwarning);
} else {
hideSnackbar();
}