From 411393740e90cb77016841ae5d7b136b3f1dd673 Mon Sep 17 00:00:00 2001 From: OSHeden Date: Sun, 28 Jan 2024 12:26:00 +0100 Subject: [PATCH 1/2] Update UrlHelper.java Added Ko-fi.com --- library/src/main/java/candybar/lib/helpers/UrlHelper.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/src/main/java/candybar/lib/helpers/UrlHelper.java b/library/src/main/java/candybar/lib/helpers/UrlHelper.java index 4d9a36d70..9d990ac46 100644 --- a/library/src/main/java/candybar/lib/helpers/UrlHelper.java +++ b/library/src/main/java/candybar/lib/helpers/UrlHelper.java @@ -57,6 +57,8 @@ public static Drawable getSocialIcon(@NonNull Context context, @NonNull Type typ return getTintedDrawable(context, R.drawable.ic_toolbar_googleplay, color); case INSTAGRAM: return getTintedDrawable(context, R.drawable.ic_toolbar_instagram, color); + case KOFI: + return getTintedDrawable(context, R.drawable.ic_toolbar_kofi, color); case MASTODON: return getTintedDrawable(context, R.drawable.ic_toolbar_mastodon, color); case MATRIX: @@ -103,6 +105,8 @@ public static Type getType(String url) { return Type.GOOGLEPLAY; } else if (url.contains("instagram.")) { return Type.INSTAGRAM; + } else if (url.contains("ko-fi.")) { + return Type.KOFI; } else if (url.contains("mastodon.")|| url.contains("mstdn.")|| url.contains("mas.")|| url.contains("todon.")|| url.contains("fosstodon.")|| url.contains("troet.")|| url.contains("chaos.")|| url.contains("floss.")) { return Type.MASTODON; } else if (url.contains("matrix.")) { @@ -133,6 +137,7 @@ public enum Type { GITLAB, GOOGLEPLAY, INSTAGRAM, + KOFI, MASTODON, MATRIX, PINTEREST, From dcb667f64b2b75ec1866cffc1c4192ad3496938e Mon Sep 17 00:00:00 2001 From: OSHeden Date: Sun, 28 Jan 2024 14:47:48 +0100 Subject: [PATCH 2/2] kofi drawable --- library/src/main/res/drawable/ic_toolbar_kofi.xml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 library/src/main/res/drawable/ic_toolbar_kofi.xml diff --git a/library/src/main/res/drawable/ic_toolbar_kofi.xml b/library/src/main/res/drawable/ic_toolbar_kofi.xml new file mode 100644 index 000000000..a5a4810b1 --- /dev/null +++ b/library/src/main/res/drawable/ic_toolbar_kofi.xml @@ -0,0 +1,9 @@ + + +