|
|
|
@ -848,6 +848,7 @@ public class SettingsActivity extends FoxActivity implements LanguageActivity {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
LongClickablePreference pref_donate_fox = findPreference("pref_donate_fox");
|
|
|
|
|
if (BuildConfig.FLAVOR.equals("play")) {
|
|
|
|
|
pref_donate_fox.setOnPreferenceClickListener(p -> {
|
|
|
|
|
// open fox
|
|
|
|
|
IntentHelper.openUrl(getFoxActivity(this), "https://paypal.me/fox2code");
|
|
|
|
@ -861,8 +862,12 @@ public class SettingsActivity extends FoxActivity implements LanguageActivity {
|
|
|
|
|
Toast.makeText(requireContext(), toastText, Toast.LENGTH_SHORT).show();
|
|
|
|
|
return true;
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
pref_donate_fox.setVisible(false);
|
|
|
|
|
}
|
|
|
|
|
// now handle pref_donate_androidacy
|
|
|
|
|
LongClickablePreference pref_donate_androidacy = findPreference("pref_donate_androidacy");
|
|
|
|
|
if (BuildConfig.FLAVOR.equals("play")) {
|
|
|
|
|
pref_donate_androidacy.setOnPreferenceClickListener(p -> {
|
|
|
|
|
// copy FOX2CODE promo code to clipboard and toast user that they can use it for half off any subscription
|
|
|
|
|
String toastText = requireContext().getString(R.string.promo_code_copied);
|
|
|
|
@ -880,6 +885,9 @@ public class SettingsActivity extends FoxActivity implements LanguageActivity {
|
|
|
|
|
Toast.makeText(requireContext(), toastText, Toast.LENGTH_SHORT).show();
|
|
|
|
|
return true;
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
pref_donate_androidacy.setVisible(false);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void openFragment(Fragment fragment, @StringRes int title) {
|
|
|
|
|