Disable unwanted menu options

This commit is contained in:
Niels Andriesse 2019-08-06 15:43:47 +10:00
parent 6eea8c9aa4
commit 149d4b0181
2 changed files with 7 additions and 4 deletions

View File

@ -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()) {

View File

@ -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);
}