GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit 171a977a authored by Matthew Finkel's avatar Matthew Finkel

Bug 40016: Add Donate settings button

parent e8e73eba
......@@ -272,6 +272,15 @@ class SettingsFragment : PreferenceFragmentCompat() {
resources.getString(R.string.pref_key_about) -> {
SettingsFragmentDirections.actionSettingsFragmentToAboutFragment()
}
resources.getString(R.string.pref_key_donate) -> {
(activity as HomeActivity).openToBrowserAndLoad(
searchTermOrURL = SupportUtils.DONATE_URL,
newTab = true,
from = BrowserDirection.FromSettings
)
null
}
resources.getString(R.string.pref_key_account) -> {
SettingsFragmentDirections.actionSettingsFragmentToAccountSettingsFragment()
}
......
......@@ -27,6 +27,7 @@ object SupportUtils {
const val FIREFOX_BETA_PLAY_STORE_URL = "market://details?id=org.mozilla.firefox_beta"
const val FIREFOX_NIGHTLY_PLAY_STORE_URL = "market://details?id=org.mozilla.fenix"
const val GOOGLE_URL = "https://www.google.com/"
const val DONATE_URL = "https://donate.torproject.org/"
const val TB_MANUAL_URL = "https://tb-manual.torproject.org/mobile-tor"
const val TOR_RELEASES = "https://www.torproject.org/releases/"
......
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="18dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12,21.35l-1.45,-1.32C5.4,15.36 2,12.28 2,8.5 2,5.42 4.42,3 7.5,3c1.74,0 3.41,0.81 4.5,2.09C13.09,3.81 14.76,3 16.5,3 19.58,3 22,5.42 22,8.5c0,3.78 -3.4,6.86 -8.55,11.54L12,21.35z"
android:fillColor="#ffffff"/>
</vector>
......@@ -41,6 +41,7 @@
<string name="pref_key_last_maintenance" translatable="false">pref_key_last_maintenance</string>
<string name="pref_key_help" translatable="false">pref_key_help</string>
<string name="pref_key_rate" translatable="false">pref_key_rate</string>
<string name="pref_key_donate" translatable="false">pref_key_donate</string>
<string name="pref_key_feedback" translatable="false">pref_key_feedback</string>
<string name="pref_key_about" translatable="false">pref_key_about</string>
<string name="pref_key_your_rights" translatable="false">pref_key_your_rights</string>
......
......@@ -4,4 +4,6 @@
<resources>
<!-- Preference for enabling non-Private Browsing Mode-->
<string name="preferences_disable_normal_mode">Allow Only Private Browsing Mode</string>
<!-- Preference link to donate to The Tor Project-->
<string name="preferences_donate">Donate to The Tor Project</string>
</resources>
......@@ -187,6 +187,11 @@
android:key="@string/pref_key_about"
android:title="@string/preferences_about" />
<androidx.preference.Preference
android:icon="@drawable/ic_favorite"
android:key="@string/pref_key_donate"
android:title="@string/preferences_donate" />
<androidx.preference.Preference
android:icon="@drawable/ic_info"
android:key="@string/pref_key_debug_settings"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment