Searching is a pro feature

This commit is contained in:
M66B
2018-08-27 17:05:34 +00:00
parent 0559a5a9b9
commit aab40f78c0
3 changed files with 32 additions and 14 deletions

View File

@@ -430,9 +430,15 @@ public class FragmentCompose extends FragmentEx {
private void onMenuEncrypt() {
Log.i(Helper.TAG, "On encrypt");
if (!PreferenceManager.getDefaultSharedPreferences(getContext()).getBoolean("pro", false)) {
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.content_frame, new FragmentPro()).addToBackStack("pro");
fragmentTransaction.commit();
return;
}
try {
if (!PreferenceManager.getDefaultSharedPreferences(getContext()).getBoolean("pro", false))
throw new IllegalArgumentException(getString(R.string.title_pro_feature));
if (openPgpConnection == null || !openPgpConnection.isBound())
throw new IllegalArgumentException(getString(R.string.title_no_openpgp));