aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui/util
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-07-09 22:37:17 +0200
committerChristian Schneppe <christian@pix-art.de>2018-07-09 22:37:17 +0200
commitcc138052977ae7d72b01661fb35b4ac42b1d53fb (patch)
tree7b7e84c01c67f23df1a22ffe8c3b081b2df53c6e /src/main/java/de/pixart/messenger/ui/util
parentdb8e2b14e81f587226b03e7392a3a89095f540df (diff)
handle non participating mucs a bit better
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/util')
-rw-r--r--src/main/java/de/pixart/messenger/ui/util/ConversationMenuConfigurator.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/util/ConversationMenuConfigurator.java b/src/main/java/de/pixart/messenger/ui/util/ConversationMenuConfigurator.java
index eb7217b95..03f7638e3 100644
--- a/src/main/java/de/pixart/messenger/ui/util/ConversationMenuConfigurator.java
+++ b/src/main/java/de/pixart/messenger/ui/util/ConversationMenuConfigurator.java
@@ -40,6 +40,7 @@ import de.pixart.messenger.R;
import de.pixart.messenger.crypto.OmemoSetting;
import de.pixart.messenger.crypto.axolotl.AxolotlService;
import de.pixart.messenger.entities.Conversation;
+import de.pixart.messenger.entities.Conversational;
import de.pixart.messenger.entities.Message;
public class ConversationMenuConfigurator {
@@ -71,6 +72,11 @@ public class ConversationMenuConfigurator {
public static void configureEncryptionMenu(@NonNull Conversation conversation, Menu menu) {
final MenuItem menuSecure = menu.findItem(R.id.action_security);
+ final boolean participating = conversation.getMode() == Conversational.MODE_SINGLE || conversation.getMucOptions().participating();
+ if (!participating) {
+ menuSecure.setVisible(false);
+ return;
+ }
final MenuItem none = menu.findItem(R.id.encryption_choice_none);
final MenuItem otr = menu.findItem(R.id.encryption_choice_otr);
final MenuItem pgp = menu.findItem(R.id.encryption_choice_pgp);