Fix issue #469: Hide "Clear Passphrase" if passphrase is disabled.

This commit is contained in:
Ben Reser 2013-12-18 20:15:21 -08:00
parent c488947248
commit 149671095b

View File

@ -35,6 +35,7 @@ import org.thoughtcrime.securesms.util.DynamicLanguage;
import org.thoughtcrime.securesms.util.DynamicTheme; import org.thoughtcrime.securesms.util.DynamicTheme;
import org.thoughtcrime.securesms.util.MemoryCleaner; import org.thoughtcrime.securesms.util.MemoryCleaner;
import org.thoughtcrime.securesms.util.Util; import org.thoughtcrime.securesms.util.Util;
import org.thoughtcrime.securesms.util.TextSecurePreferences;
import org.whispersystems.textsecure.crypto.MasterSecret; import org.whispersystems.textsecure.crypto.MasterSecret;
import java.util.ArrayList; import java.util.ArrayList;
@ -100,6 +101,8 @@ public class ConversationListActivity extends PassphraseRequiredSherlockFragment
inflater.inflate(R.menu.text_secure_normal, menu); inflater.inflate(R.menu.text_secure_normal, menu);
menu.findItem(R.id.menu_clear_passphrase).setVisible(!TextSecurePreferences.isPasswordDisabled(this));
super.onPrepareOptionsMenu(menu); super.onPrepareOptionsMenu(menu);
return true; return true;
} }