aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-05-07 13:09:40 +0200
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-05-07 13:09:40 +0200
commitdaa000dd755a7ea2e911f9f59b7721adf4620ab7 (patch)
treec947eb58b21643df13ae9fd8e346ec5256616e9e /src/eu/siacs/conversations
parent247f45f46bf2f02d182e09528b3f0a44960e3a7d (diff)
improved next encryption selection
Diffstat (limited to 'src/eu/siacs/conversations')
-rw-r--r--src/eu/siacs/conversations/entities/Conversation.java5
-rw-r--r--src/eu/siacs/conversations/ui/ConversationFragment.java2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/eu/siacs/conversations/entities/Conversation.java b/src/eu/siacs/conversations/entities/Conversation.java
index add51d52..d800cfd4 100644
--- a/src/eu/siacs/conversations/entities/Conversation.java
+++ b/src/eu/siacs/conversations/entities/Conversation.java
@@ -56,7 +56,7 @@ public class Conversation extends AbstractEntity {
private transient String otrFingerprint = null;
- private int nextMessageEncryption = Message.ENCRYPTION_NONE;
+ private int nextMessageEncryption = -1;
private String nextMessage;
private transient MucOptions mucOptions = null;
@@ -332,6 +332,9 @@ public class Conversation extends AbstractEntity {
}
public int getNextEncryption() {
+ if (this.nextMessageEncryption == -1) {
+ return this.getLatestEncryption();
+ }
return this.nextMessageEncryption;
}
diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java
index ca59c882..ebfeb8a3 100644
--- a/src/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/eu/siacs/conversations/ui/ConversationFragment.java
@@ -565,8 +565,6 @@ public class ConversationFragment extends Fragment {
this.messageListAdapter.notifyDataSetChanged();
if (conversation.getMode() == Conversation.MODE_SINGLE) {
if (messageList.size() >= 1) {
- conversation.setNextEncryption(conversation
- .getLatestEncryption());
makeFingerprintWarning(conversation.getLatestEncryption());
}
} else {