aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-06-01 19:08:42 +0200
committeriNPUTmice <daniel@gultsch.de>2014-06-01 19:08:42 +0200
commit32a21e1ab94b625e99c125779a03ea29690f9533 (patch)
tree882f013478c0ef296014f80ac73a905bdc6d711c /src/eu/siacs
parent8ea73feec405dffc47e5273ab034cb40af327a85 (diff)
unified crypto messages and made lock icon work for conferences
Diffstat (limited to 'src/eu/siacs')
-rw-r--r--src/eu/siacs/conversations/ui/ConversationActivity.java10
-rw-r--r--src/eu/siacs/conversations/ui/ConversationFragment.java28
2 files changed, 17 insertions, 21 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java
index fbb08e71..05120a41 100644
--- a/src/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/eu/siacs/conversations/ui/ConversationActivity.java
@@ -321,16 +321,16 @@ public class ConversationActivity extends XmppActivity {
((MenuItem) menu.findItem(R.id.action_add)).setVisible(!spl
.isSlideable());
if (this.getSelectedConversation() != null) {
+ if (this.getSelectedConversation().getLatestMessage()
+ .getEncryption() != Message.ENCRYPTION_NONE) {
+ menuSecure.setIcon(R.drawable.ic_action_secure);
+ }
if (this.getSelectedConversation().getMode() == Conversation.MODE_MULTI) {
menuContactDetails.setVisible(false);
menuAttach.setVisible(false);
} else {
menuMucDetails.setVisible(false);
menuInviteContacts.setVisible(false);
- if (this.getSelectedConversation().getLatestMessage()
- .getEncryption() != Message.ENCRYPTION_NONE) {
- menuSecure.setIcon(R.drawable.ic_action_secure);
- }
}
}
}
@@ -539,7 +539,7 @@ public class ConversationActivity extends XmppActivity {
popup.inflate(R.menu.encryption_choices);
MenuItem otr = popup.getMenu().findItem(R.id.encryption_choice_otr);
if (conversation.getMode() == Conversation.MODE_MULTI) {
- otr.setVisible(false);
+ otr.setEnabled(false);
}
switch (conversation.getNextEncryption()) {
case Message.ENCRYPTION_NONE:
diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java
index f23a6bfe..7d82dcd4 100644
--- a/src/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/eu/siacs/conversations/ui/ConversationFragment.java
@@ -124,22 +124,18 @@ public class ConversationFragment extends Fragment {
}
public void updateChatMsgHint() {
- if (conversation.getMode() == Conversation.MODE_MULTI) {
- chatMsg.setHint(getString(R.string.send_message_to_conference));
- } else {
- switch (conversation.getNextEncryption()) {
- case Message.ENCRYPTION_NONE:
- chatMsg.setHint(getString(R.string.send_plain_text_message));
- break;
- case Message.ENCRYPTION_OTR:
- chatMsg.setHint(getString(R.string.send_otr_message));
- break;
- case Message.ENCRYPTION_PGP:
- chatMsg.setHint(getString(R.string.send_pgp_message));
- break;
- default:
- break;
- }
+ switch (conversation.getNextEncryption()) {
+ case Message.ENCRYPTION_NONE:
+ chatMsg.setHint(getString(R.string.send_plain_text_message));
+ break;
+ case Message.ENCRYPTION_OTR:
+ chatMsg.setHint(getString(R.string.send_otr_message));
+ break;
+ case Message.ENCRYPTION_PGP:
+ chatMsg.setHint(getString(R.string.send_pgp_message));
+ break;
+ default:
+ break;
}
}