From 149d4b0181de34e308d1c187ec2620f5fabf7d90 Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Tue, 6 Aug 2019 15:43:47 +1000 Subject: [PATCH] Disable unwanted menu options --- .../securesms/conversation/ConversationActivity.java | 6 ++++-- .../securesms/conversation/ConversationTitleView.java | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java b/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java index 5cd4ea9b2d..c3898c0ec1 100644 --- a/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java +++ b/src/org/thoughtcrime/securesms/conversation/ConversationActivity.java @@ -610,7 +610,9 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity MenuInflater inflater = this.getMenuInflater(); menu.clear(); - if (isSecureText) { + boolean isLokiPublicChat = isGroupConversation(); // TODO: Figure out a better way of determining this + + if (isSecureText && !isLokiPublicChat) { // TODO: if (recipient.getExpireMessages() > 0) { inflater.inflate(R.menu.conversation_expiring_on, menu); @@ -630,7 +632,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity if (isSecureText) inflater.inflate(R.menu.conversation_callable_secure, menu); else inflater.inflate(R.menu.conversation_callable_insecure, menu); */ - } else if (isGroupConversation()) { + } else if (isGroupConversation() && !isLokiPublicChat) { inflater.inflate(R.menu.conversation_group_options, menu); if (!isPushGroupConversation()) { diff --git a/src/org/thoughtcrime/securesms/conversation/ConversationTitleView.java b/src/org/thoughtcrime/securesms/conversation/ConversationTitleView.java index f0550baab3..d4c4630b31 100644 --- a/src/org/thoughtcrime/securesms/conversation/ConversationTitleView.java +++ b/src/org/thoughtcrime/securesms/conversation/ConversationTitleView.java @@ -14,13 +14,14 @@ import android.widget.TextView; import com.annimon.stream.Collectors; import com.annimon.stream.Stream; -import network.loki.messenger.R; import org.thoughtcrime.securesms.components.AvatarImageView; import org.thoughtcrime.securesms.mms.GlideRequests; import org.thoughtcrime.securesms.recipients.Recipient; import org.thoughtcrime.securesms.util.TextSecurePreferences; import org.thoughtcrime.securesms.util.ViewUtil; +import network.loki.messenger.R; + public class ConversationTitleView extends RelativeLayout { @SuppressWarnings("unused") @@ -120,7 +121,7 @@ public class ConversationTitleView extends RelativeLayout { .map(Recipient::toShortString) .collect(Collectors.joining(", "))); - this.subtitle.setVisibility(View.VISIBLE); + this.subtitle.setVisibility(View.GONE); this.subtitleContainer.setVisibility(VISIBLE); }