Browse Source

Removed donate link in Transdrone version to meet Play Store regulations

bugfix/391
Eric Kok 6 years ago
parent
commit
b9a1980f75
  1. 4
      app/src/lite/res/values/strings.xml
  2. 5
      app/src/main/java/org/transdroid/core/gui/settings/MainSettingsActivity.java

4
app/src/lite/res/values/strings.xml

@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
<string name="app_name" translatable="false">Transdrone</string>
<string name="donate_text">Donate via transdroid.org</string>
<string name="donate_url">https://transdroid.org</string>
<string name="donate_text"></string>
<string name="donate_url"></string>
</resources>

5
app/src/main/java/org/transdroid/core/gui/settings/MainSettingsActivity.java

@ -178,6 +178,7 @@ public class MainSettingsActivity extends PreferenceCompatActivity { @@ -178,6 +178,7 @@ public class MainSettingsActivity extends PreferenceCompatActivity {
boolean enableSearchUi = navigationHelper.enableSearchUi();
boolean enableRssUi = navigationHelper.enableRssUi();
boolean enableDonateLink = !getString(R.string.donate_url).isEmpty();
// Load the preference menu and attach actions
addPreferencesFromResource(R.xml.pref_main);
@ -191,7 +192,11 @@ public class MainSettingsActivity extends PreferenceCompatActivity { @@ -191,7 +192,11 @@ public class MainSettingsActivity extends PreferenceCompatActivity {
findPreference("header_background").setOnPreferenceClickListener(onBackgroundSettings);
findPreference("header_system").setOnPreferenceClickListener(onSystemSettings);
findPreference("header_help").setOnPreferenceClickListener(onHelpSettings);
if (enableDonateLink) {
findPreference("header_donate").setOnPreferenceClickListener(onDonate);
} else {
getPreferenceScreen().removePreference(findPreference("header_donate"));
}
// Keep a list of the server codes and names (for default server selection)
List<String> serverCodes = new ArrayList<>();

Loading…
Cancel
Save