diff --git a/app/ui/src/main/java/de/mm20/launcher2/ui/settings/about/AboutSettingsScreen.kt b/app/ui/src/main/java/de/mm20/launcher2/ui/settings/about/AboutSettingsScreen.kt index 861f98511..ca23dafeb 100644 --- a/app/ui/src/main/java/de/mm20/launcher2/ui/settings/about/AboutSettingsScreen.kt +++ b/app/ui/src/main/java/de/mm20/launcher2/ui/settings/about/AboutSettingsScreen.kt @@ -10,6 +10,7 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource +import androidx.core.net.toUri import androidx.lifecycle.viewmodel.compose.viewModel import androidx.navigation3.runtime.NavKey import de.mm20.launcher2.licenses.OpenSourceLicenses @@ -78,6 +79,21 @@ fun AboutSettingsScreen() { ) } } + item { + PreferenceCategory(title = stringResource(id = R.string.preference_category_donate)) { + Preference( + icon = R.drawable.favorite_24px, + title = "GitHub Sponsors", + summary = "github.com/sponsors/MM2-0", + onClick = { + + context.startActivity(Intent(Intent.ACTION_VIEW).apply { + data = "https://github.com/sponsors/MM2-0".toUri() + }) + } + ) + } + } item { PreferenceCategory(title = stringResource(id = R.string.preference_category_links)) { Preference( @@ -86,7 +102,7 @@ fun AboutSettingsScreen() { summary = "github.com/MM2-0/Kvaesitso", onClick = { context.startActivity(Intent(Intent.ACTION_VIEW).apply { - data = Uri.parse("https://github.com/MM2-0/Kvaesitso") + data = "https://github.com/MM2-0/Kvaesitso".toUri() }) } ) @@ -96,7 +112,7 @@ fun AboutSettingsScreen() { summary = "t.me/Kvaesitso", onClick = { context.startActivity(Intent(Intent.ACTION_VIEW).apply { - data = Uri.parse("https://t.me/Kvaesitso") + data = "https://t.me/Kvaesitso".toUri() }) } ) @@ -107,7 +123,7 @@ fun AboutSettingsScreen() { onClick = { context.startActivity(Intent(Intent.ACTION_VIEW).apply { data = - Uri.parse("https://fdroid.mm20.de") + "https://fdroid.mm20.de".toUri() }) } ) diff --git a/core/base/src/main/res/drawable/favorite_24px.xml b/core/base/src/main/res/drawable/favorite_24px.xml new file mode 100644 index 000000000..6eb1bd8c4 --- /dev/null +++ b/core/base/src/main/res/drawable/favorite_24px.xml @@ -0,0 +1,10 @@ + + + diff --git a/core/i18n/src/main/res/values/strings.xml b/core/i18n/src/main/res/values/strings.xml index d14c7cd91..9d294070d 100644 --- a/core/i18n/src/main/res/values/strings.xml +++ b/core/i18n/src/main/res/values/strings.xml @@ -1109,4 +1109,5 @@ Hamburg Preview The quick brown fox\njumps over 1234790 + Support the development