From e556b917b600379b37787c13a5ddf5caf84fbf36 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 24 Jun 2020 13:10:22 +0200 Subject: [PATCH] Removed invite / other apps --- app/build.gradle | 6 --- .../java/eu/faircode/email/ActivityView.java | 44 ------------------- app/src/main/res/values/strings.xml | 4 -- 3 files changed, 54 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 8a83c1fb69..cd1a9b7b55 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -129,32 +129,26 @@ android { dimension "all" buildConfigField "boolean", "BETA_RELEASE", "true" buildConfigField "boolean", "PLAY_STORE_RELEASE", "false" - buildConfigField "String", "INVITE_URI", "\"https://email.faircode.eu/\"" buildConfigField "String", "PRO_FEATURES_URI", "\"https://email.faircode.eu/donate/\"" buildConfigField "String", "CHANGELOG", "\"https://github.com/M66B/FairEmail/releases/\"" buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/open-source-email/releases/latest\"" - buildConfigField "String", "APPS_URI", "\"https://github.com/M66B?tab=repositories/\"" } fdroid { dimension "all" buildConfigField "boolean", "BETA_RELEASE", "true" buildConfigField "boolean", "PLAY_STORE_RELEASE", "false" - buildConfigField "String", "INVITE_URI", "\"https://email.faircode.eu/\"" buildConfigField "String", "PRO_FEATURES_URI", "\"https://email.faircode.eu/donate/\"" buildConfigField "String", "CHANGELOG", "\"https://github.com/M66B/FairEmail/releases/\"" buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/open-source-email/releases/latest\"" - buildConfigField "String", "APPS_URI", "\"https://github.com/M66B?tab=repositories/\"" } play { dimension "all" //minSdkVersion 23 buildConfigField "boolean", "BETA_RELEASE", "true" buildConfigField "boolean", "PLAY_STORE_RELEASE", "true" - buildConfigField "String", "INVITE_URI", "\"https://play.google.com/store/apps/details?id=eu.faircode.email\"" buildConfigField "String", "PRO_FEATURES_URI", "\"https://email.faircode.eu/#pro\"" buildConfigField "String", "CHANGELOG", "\"\"" buildConfigField "String", "GITHUB_LATEST_API", "\"\"" - buildConfigField "String", "APPS_URI", "\"https://play.google.com/store/apps/dev?id=8420080860664580239\"" } } diff --git a/app/src/main/java/eu/faircode/email/ActivityView.java b/app/src/main/java/eu/faircode/email/ActivityView.java index d6a9e7253c..ab41f05a51 100644 --- a/app/src/main/java/eu/faircode/email/ActivityView.java +++ b/app/src/main/java/eu/faircode/email/ActivityView.java @@ -542,15 +542,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB } })); - extra.add(new NavMenuItem(R.drawable.baseline_people_24, R.string.menu_invite, new Runnable() { - @Override - public void run() { - if (!drawerLayout.isLocked(drawerContainer)) - drawerLayout.closeDrawer(drawerContainer); - onMenuInvite(); - } - }).setExternal(true)); - if ((Helper.isPlayStoreInstall() || BuildConfig.DEBUG)) extra.add(new NavMenuItem(R.drawable.baseline_star_24, R.string.menu_rate, new Runnable() { @Override @@ -561,15 +552,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB } }).setExternal(true)); - extra.add(new NavMenuItem(R.drawable.baseline_get_app_24, R.string.menu_other, new Runnable() { - @Override - public void run() { - if (!drawerLayout.isLocked(drawerContainer)) - drawerLayout.closeDrawer(drawerContainer); - onMenuOtherApps(); - } - }).setExternal(true)); - adapterNavMenuExtra.set(extra); // Live data @@ -1007,12 +989,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB } } - private Intent getIntentOtherApps() { - Intent intent = new Intent(Intent.ACTION_VIEW); - intent.setData(Uri.parse(BuildConfig.APPS_URI)); - return intent; - } - private void onMenuFolders(long account) { if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) getSupportFragmentManager().popBackStack("unified", 0); @@ -1126,18 +1102,10 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB fragmentTransaction.commit(); } - private void onMenuInvite() { - startActivity(getIntentInvite(this)); - } - private void onMenuRate() { new FragmentDialogRate().show(getSupportFragmentManager(), "rate"); } - private void onMenuOtherApps() { - Helper.view(this, getIntentOtherApps()); - } - private void onDebugInfo() { new SimpleTask() { @Override @@ -1335,18 +1303,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB String html_url; } - private static Intent getIntentInvite(Context context) { - StringBuilder sb = new StringBuilder(); - sb.append(context.getString(R.string.title_try)).append("\n\n"); - sb.append(BuildConfig.INVITE_URI).append("\n\n"); - - Intent intent = new Intent(Intent.ACTION_SEND); - intent.setType("text/plain"); - intent.putExtra(Intent.EXTRA_SUBJECT, context.getString(R.string.app_name)); - intent.putExtra(Intent.EXTRA_TEXT, sb.toString()); - return intent; - } - public static class FragmentDialogFirst extends FragmentDialogBase { @NonNull @Override diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d25c398ca3..06b1f1c185 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -122,9 +122,7 @@ About Pro features - Invite Rate this app - Other apps Welcome End-user license agreement @@ -1262,8 +1260,6 @@ Maybe Calendar - Try FairEmail, an open source, privacy friendly email app for Android - This is a pro feature List of pro features Buy