improved next encryption selection
This commit is contained in:
parent
247f45f46b
commit
daa000dd75
|
@ -56,7 +56,7 @@ public class Conversation extends AbstractEntity {
|
||||||
|
|
||||||
private transient String otrFingerprint = null;
|
private transient String otrFingerprint = null;
|
||||||
|
|
||||||
private int nextMessageEncryption = Message.ENCRYPTION_NONE;
|
private int nextMessageEncryption = -1;
|
||||||
private String nextMessage;
|
private String nextMessage;
|
||||||
|
|
||||||
private transient MucOptions mucOptions = null;
|
private transient MucOptions mucOptions = null;
|
||||||
|
@ -332,6 +332,9 @@ public class Conversation extends AbstractEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNextEncryption() {
|
public int getNextEncryption() {
|
||||||
|
if (this.nextMessageEncryption == -1) {
|
||||||
|
return this.getLatestEncryption();
|
||||||
|
}
|
||||||
return this.nextMessageEncryption;
|
return this.nextMessageEncryption;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -565,8 +565,6 @@ public class ConversationFragment extends Fragment {
|
||||||
this.messageListAdapter.notifyDataSetChanged();
|
this.messageListAdapter.notifyDataSetChanged();
|
||||||
if (conversation.getMode() == Conversation.MODE_SINGLE) {
|
if (conversation.getMode() == Conversation.MODE_SINGLE) {
|
||||||
if (messageList.size() >= 1) {
|
if (messageList.size() >= 1) {
|
||||||
conversation.setNextEncryption(conversation
|
|
||||||
.getLatestEncryption());
|
|
||||||
makeFingerprintWarning(conversation.getLatestEncryption());
|
makeFingerprintWarning(conversation.getLatestEncryption());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue