From 3861084ea212b3d040dbc3d76453ae8da713c3b0 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Tue, 3 Jan 2017 13:36:34 -0800 Subject: [PATCH] Disable expiration menu on inactive group Fixes #6007 // FREEBIE --- src/org/thoughtcrime/securesms/ConversationActivity.java | 4 ++++ src/org/thoughtcrime/securesms/components/ComposeText.java | 1 + 2 files changed, 5 insertions(+) diff --git a/src/org/thoughtcrime/securesms/ConversationActivity.java b/src/org/thoughtcrime/securesms/ConversationActivity.java index 77d678b185..bd68b6d8ec 100644 --- a/src/org/thoughtcrime/securesms/ConversationActivity.java +++ b/src/org/thoughtcrime/securesms/ConversationActivity.java @@ -510,6 +510,10 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity } private void handleSelectMessageExpiration() { + if (isPushGroupConversation() && !isActiveGroup()) { + return; + } + ExpirationDialog.show(this, recipients.getExpireMessages(), new ExpirationDialog.OnClickListener() { @Override public void onClick(final int expirationTime) { diff --git a/src/org/thoughtcrime/securesms/components/ComposeText.java b/src/org/thoughtcrime/securesms/components/ComposeText.java index 318ba15bf6..100244e40a 100644 --- a/src/org/thoughtcrime/securesms/components/ComposeText.java +++ b/src/org/thoughtcrime/securesms/components/ComposeText.java @@ -133,6 +133,7 @@ public class ComposeText extends EmojiEditText { if (Build.VERSION.SDK_INT <= 13) return inputConnection; if (mediaListener == null) return inputConnection; + if (inputConnection == null) return null; EditorInfoCompat.setContentMimeTypes(editorInfo, new String[] {"image/jpeg", "image/png", "image/gif"}); return InputConnectionCompat.createWrapper(inputConnection, editorInfo, new CommitContentListener(mediaListener));