Refactoring

pull/147/head
M66B 6 years ago
parent 9b475c2e2e
commit f53a308db3

@ -50,27 +50,27 @@ android {
productFlavors {
full {
dimension "all"
buildConfigField "boolean", "BETA_RELEASE", "true"
buildConfigField "boolean", "PLAY_STORE_RELEASE", "false"
buildConfigField "String", "INVITE_LINK", "\"https://email.faircode.eu/\""
buildConfigField "String", "PRO_FEATURES", "\"https://email.faircode.eu/donate/\""
buildConfigField "String", "INVITE_URI", "\"https://email.faircode.eu/\""
buildConfigField "String", "PRO_FEATURES_URI", "\"https://email.faircode.eu/donate/\""
buildConfigField "String", "GITHUB_LATEST_API", "\"https://api.github.com/repos/M66B/open-source-email/releases/latest\""
buildConfigField "boolean", "BETA_RELEASE", "true"
}
play_beta {
dimension "all"
buildConfigField "boolean", "BETA_RELEASE", "true"
buildConfigField "boolean", "PLAY_STORE_RELEASE", "true"
buildConfigField "String", "INVITE_LINK", "\"https://play.google.com/apps/testing/eu.faircode.email\""
buildConfigField "String", "PRO_FEATURES", "\"https://email.faircode.eu/#pro\""
buildConfigField "String", "INVITE_URI", "\"https://play.google.com/apps/testing/eu.faircode.email\""
buildConfigField "String", "PRO_FEATURES_URI", "\"https://email.faircode.eu/#pro\""
buildConfigField "String", "GITHUB_LATEST_API", "\"\""
buildConfigField "boolean", "BETA_RELEASE", "true"
}
play_release {
dimension "all"
buildConfigField "boolean", "BETA_RELEASE", "false"
buildConfigField "boolean", "PLAY_STORE_RELEASE", "true"
buildConfigField "String", "INVITE_LINK", "\"https://play.google.com/store/apps/details?id=eu.faircode.email\""
buildConfigField "String", "PRO_FEATURES", "\"https://email.faircode.eu/#pro\""
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", "GITHUB_LATEST_API", "\"\""
buildConfigField "boolean", "BETA_RELEASE", "false"
}
}

@ -101,7 +101,7 @@ abstract class ActivityBilling extends ActivityBase implements PurchasesUpdatedL
try {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(BuildConfig.PRO_FEATURES + "?challenge=" + getChallenge()));
intent.setData(Uri.parse(BuildConfig.PRO_FEATURES_URI + "?challenge=" + getChallenge()));
return intent;
} catch (NoSuchAlgorithmException ex) {
Log.e(ex);

@ -806,7 +806,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
private Intent getIntentInvite() {
StringBuilder sb = new StringBuilder();
sb.append(getString(R.string.title_try)).append("\n\n");
sb.append(BuildConfig.INVITE_LINK).append("\n\n");
sb.append(BuildConfig.INVITE_URI).append("\n\n");
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");

@ -53,7 +53,7 @@ public class FragmentPro extends FragmentBase implements SharedPreferences.OnSha
btnPurchase = view.findViewById(R.id.btnPurchase);
tvPrice = view.findViewById(R.id.tvPrice);
tvList.setText(Html.fromHtml("<a href=\"" + BuildConfig.PRO_FEATURES + "\">" + Html.escapeHtml(getString(R.string.title_pro_list)) + "</a>"));
tvList.setText(Html.fromHtml("<a href=\"" + BuildConfig.PRO_FEATURES_URI + "\">" + Html.escapeHtml(getString(R.string.title_pro_list)) + "</a>"));
tvList.setMovementMethod(LinkMovementMethod.getInstance());
btnPurchase.setOnClickListener(new View.OnClickListener() {

Loading…
Cancel
Save