fix getNextEncryption
This commit is contained in:
parent
442c284c8e
commit
5363470bcf
|
@ -600,7 +600,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
|
||||||
defaultEncryption = Message.ENCRYPTION_NONE;
|
defaultEncryption = Message.ENCRYPTION_NONE;
|
||||||
}
|
}
|
||||||
int encryption = this.getIntAttribute(ATTRIBUTE_NEXT_ENCRYPTION, defaultEncryption);
|
int encryption = this.getIntAttribute(ATTRIBUTE_NEXT_ENCRYPTION, defaultEncryption);
|
||||||
if (encryption == Message.ENCRYPTION_OTR) {
|
if (encryption == Message.ENCRYPTION_OTR || encryption < 0) {
|
||||||
return defaultEncryption;
|
return defaultEncryption;
|
||||||
} else {
|
} else {
|
||||||
return encryption;
|
return encryption;
|
||||||
|
|
|
@ -1272,16 +1272,12 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
|
||||||
}
|
}
|
||||||
selectPresenceToAttachFile(attachmentChoice);
|
selectPresenceToAttachFile(attachmentChoice);
|
||||||
} else {
|
} else {
|
||||||
final ConversationFragment fragment = (ConversationFragment) getFragmentManager()
|
showNoPGPKeyDialog(false, (dialog, which) -> {
|
||||||
.findFragmentByTag("conversation");
|
|
||||||
if (fragment != null) {
|
|
||||||
fragment.showNoPGPKeyDialog(false, (dialog, which) -> {
|
|
||||||
conversation.setNextEncryption(Message.ENCRYPTION_NONE);
|
conversation.setNextEncryption(Message.ENCRYPTION_NONE);
|
||||||
activity.xmppConnectionService.updateConversation(conversation);
|
activity.xmppConnectionService.updateConversation(conversation);
|
||||||
selectPresenceToAttachFile(attachmentChoice);
|
selectPresenceToAttachFile(attachmentChoice);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
activity.showInstallPgpDialog();
|
activity.showInstallPgpDialog();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue