aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2015-01-25 20:53:29 +0100
committerDaniel Gultsch <daniel@gultsch.de>2015-01-25 20:53:29 +0100
commit4afdd6480a875dddbb0a24473ca2ec0af39c9826 (patch)
tree89ccc5691ffba410123d61b4ed5dcdf5e3be878d /src/main/java/eu/siacs
parent155914470118e0d68f3e042644beadeb7590b666 (diff)
parent78006478858fe074ecea4224063c0e6fc156ce4e (diff)
Merge pull request #930 from betheg/otr
otr: switch to the otr-state the partner alternate.
Diffstat (limited to 'src/main/java/eu/siacs')
-rw-r--r--src/main/java/eu/siacs/conversations/parser/MessageParser.java2
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationFragment.java1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
index bfe081cd..0f56f734 100644
--- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
@@ -102,8 +102,10 @@ public class MessageParser extends AbstractParser implements
body = otrSession.transformReceiving(body);
SessionStatus after = otrSession.getSessionStatus();
if ((before != after) && (after == SessionStatus.ENCRYPTED)) {
+ conversation.setNextEncryption(Message.ENCRYPTION_OTR);
mXmppConnectionService.onOtrSessionEstablished(conversation);
} else if ((before != after) && (after == SessionStatus.FINISHED)) {
+ conversation.setNextEncryption(Message.ENCRYPTION_NONE);
conversation.resetOtrSession();
mXmppConnectionService.updateConversationUi();
}
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
index c1e02400..49b6d0fb 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
@@ -298,6 +298,7 @@ public class ConversationFragment extends Fragment {
default:
break;
}
+ getActivity().invalidateOptionsMenu();
}
}