From 5a2867057ba33b53e7fb8cea57fe3c0da4026690 Mon Sep 17 00:00:00 2001
From: ARBoyGo <69381592+ARBoyGo@users.noreply.github.com>
Date: Wed, 20 Sep 2023 12:03:10 +0300
Subject: [PATCH] chore: add donation link in About Activity (#4823)
---
.../libretube/ui/activities/AboutActivity.kt | 2 ++
app/src/main/res/drawable/ic_donate.xml | 19 +++++++++++++++++++
app/src/main/res/layout/activity_about.xml | 11 +++++++++++
app/src/main/res/values/strings.xml | 1 +
4 files changed, 33 insertions(+)
create mode 100644 app/src/main/res/drawable/ic_donate.xml
diff --git a/app/src/main/java/com/github/libretube/ui/activities/AboutActivity.kt b/app/src/main/java/com/github/libretube/ui/activities/AboutActivity.kt
index c6a69d685..857463859 100644
--- a/app/src/main/java/com/github/libretube/ui/activities/AboutActivity.kt
+++ b/app/src/main/java/com/github/libretube/ui/activities/AboutActivity.kt
@@ -34,6 +34,7 @@ class AboutActivity : BaseActivity() {
startActivity(Intent.createChooser(sendIntent, null))
}
+ setupCard(binding.donate, DONATE_URL)
setupCard(binding.website, WEBSITE_URL)
setupCard(binding.piped, PIPED_GITHUB_URL)
setupCard(binding.translate, WEBLATE_URL)
@@ -108,6 +109,7 @@ class AboutActivity : BaseActivity() {
}
companion object {
+ private const val DONATE_URL = "https://github.com/libre-tube/LibreTube#donate"
private const val WEBSITE_URL = "https://libretube.dev"
private const val GITHUB_URL = "https://github.com/libre-tube/LibreTube"
private const val PIPED_GITHUB_URL = "https://github.com/TeamPiped/Piped"
diff --git a/app/src/main/res/drawable/ic_donate.xml b/app/src/main/res/drawable/ic_donate.xml
new file mode 100644
index 000000000..0ad81da4e
--- /dev/null
+++ b/app/src/main/res/drawable/ic_donate.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml
index ece2000c5..fed0e0c26 100644
--- a/app/src/main/res/layout/activity_about.xml
+++ b/app/src/main/res/layout/activity_about.xml
@@ -37,6 +37,17 @@
android:textSize="24sp"
android:textStyle="bold" />
+
+
+
+
+
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 31446123b..aa2c43088 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -62,6 +62,7 @@
Instance
Adjustments
Website
+ Donate
%1$s • %2$d videos
%1$s subscribers • %2$d videos
%1$d videos