From 4fb5c528ca9477a518edc442012171212b3e0f86 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 21 Jul 2019 21:19:21 +0200 Subject: [PATCH] Show check on debug only --- app/src/main/java/eu/faircode/email/FragmentPro.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentPro.java b/app/src/main/java/eu/faircode/email/FragmentPro.java index 7c7dedf8f2..c6796a8a6e 100644 --- a/app/src/main/java/eu/faircode/email/FragmentPro.java +++ b/app/src/main/java/eu/faircode/email/FragmentPro.java @@ -52,6 +52,9 @@ public class FragmentPro extends FragmentBase implements SharedPreferences.OnSha public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { setSubtitle(R.string.menu_pro); + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext()); + boolean debug = prefs.getBoolean("debug", false); + View view = inflater.inflate(R.layout.fragment_pro, container, false); tvPending = view.findViewById(R.id.tvPending); @@ -89,7 +92,7 @@ public class FragmentPro extends FragmentBase implements SharedPreferences.OnSha btnPurchase.setEnabled(false); tvPrice.setText(null); btnCheck.setEnabled(false); - btnCheck.setVisibility(Helper.isPlayStoreInstall(getContext()) ? View.VISIBLE : View.GONE); + btnCheck.setVisibility(Helper.isPlayStoreInstall(getContext()) && debug ? View.VISIBLE : View.GONE); return view; }