From ebf7baaa65d7074de2ab6d9036f224b81155c4ed Mon Sep 17 00:00:00 2001 From: gdlbo <41114720+gdlbo@users.noreply.github.com> Date: Sat, 4 Jun 2022 20:36:00 +0300 Subject: [PATCH] fixed links + disable recomms --- .../java/ru/vtosters/lite/utils/JsonInjectors.java | 13 +++++++------ .../java/ru/vtosters/lite/utils/Preferences.java | 4 ++++ smali/res/xml/preferences_other.xml | 4 ++++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/ru/vtosters/lite/utils/JsonInjectors.java b/app/src/main/java/ru/vtosters/lite/utils/JsonInjectors.java index 45dcb3ca5..65eef3b34 100644 --- a/app/src/main/java/ru/vtosters/lite/utils/JsonInjectors.java +++ b/app/src/main/java/ru/vtosters/lite/utils/JsonInjectors.java @@ -1,5 +1,6 @@ package ru.vtosters.lite.utils; +import static ru.vtosters.lite.utils.Preferences.donaterecomm; import static ru.vtosters.lite.utils.Preferences.hasVerification; import org.json.JSONException; @@ -8,7 +9,7 @@ import org.json.JSONObject; public class JsonInjectors { public static JSONObject profileButton() throws JSONException { String pic = "https:\\/\\/sun1-18.userapi.com\\/NLd_rNpGuSaBnPV6O-j5mqCGZk8BK8drAMd2LQ\\/5R-DEF37PFs.png"; - String title = "Помоги проекту донатом и получи приятный бонус!"; + String title = "Помоги проекту донатом и получи бонус!"; String link = "https:\\/\\/vk.com\\/vtosters_official"; String text_color = "2D81E0"; @@ -17,11 +18,11 @@ public class JsonInjectors { } public static JSONObject discoverBanner() throws JSONException { - String smallimg = "https:\\/\\/cdn0.iconfinder.com\\/data\\/icons\\/user-interface-vol-5-4\\/66\\/29-512.png"; - String background = "https:\\/\\/webmaestroblog.ru\\/wp-content\\/uploads\\/2017\\/12\\/af667fe2b7e451ffb6d7939ca82d5ac81.png"; + String smallimg = "https:\\/\\/psv4.userapi.com\\/c505536\\/u251706814\\/docs\\/d22\\/f608ae5431ba\\/IMG_20220604_202507_144.png"; + String background = "https:\\/\\/psv4.userapi.com\\/c235031\\/u251706814\\/docs\\/d48\\/8d4c0e16d450\\/IMG_20220604_202504_348.jpg"; String title = "Задонать"; String desc = "Помоги проекту донатом и получи приятные бонусы на аккаунт"; - String text_color = "FFFFFF"; + String text_color = "ffffff"; JSONObject jsonObj = new JSONObject("{\"title\":\"" + title + "\",\"description\":\"" + desc + "\",\"text_color\":\"#" + text_color + "\",\"image\":[{\"url\":\"" + smallimg + "\",\"width\":72,\"height\":72},{\"url\":\"" + smallimg + "\",\"width\":108,\"height\":108},{\"url\":\"" + smallimg + "\",\"width\":144,\"height\":144},{\"url\":\"" + smallimg + "\",\"width\":216,\"height\":216},{\"url\":\"" + smallimg + "\",\"width\":288,\"height\":288}],\"background\":[{\"url\":\"" + background + "\",\"width\":344,\"height\":215},{\"url\":\"" + background + "\",\"width\":516,\"height\":323},{\"url\":\"" + background + "\",\"width\":680,\"height\":426},{\"url\":\"" + background + "\",\"width\":1032,\"height\":645},{\"url\":\"" + background + "\",\"width\":1376,\"height\":860}]}"); return jsonObj; @@ -35,10 +36,10 @@ public class JsonInjectors { } public static String haveDonateBanner() { - return hasVerification()? "null" : "info"; + return hasVerification() || donaterecomm() ? "null" : "info"; } public static String haveDonateButton() { - return hasVerification()? "null" : "buttons"; + return hasVerification() || donaterecomm() ? "null" : "buttons"; } } diff --git a/app/src/main/java/ru/vtosters/lite/utils/Preferences.java b/app/src/main/java/ru/vtosters/lite/utils/Preferences.java index dd10027ce..7865124bb 100644 --- a/app/src/main/java/ru/vtosters/lite/utils/Preferences.java +++ b/app/src/main/java/ru/vtosters/lite/utils/Preferences.java @@ -330,6 +330,10 @@ public class Preferences { return getBoolValue("vkme_msg", false); } + public static boolean donaterecomm() { + return getBoolValue("donaterecomm", false); + } + public static String VKVersion() { return VKVER; } diff --git a/smali/res/xml/preferences_other.xml b/smali/res/xml/preferences_other.xml index b8cc003a8..ef2453725 100644 --- a/smali/res/xml/preferences_other.xml +++ b/smali/res/xml/preferences_other.xml @@ -68,5 +68,9 @@ android:defaultValue="true" android:key="VT_Fire" android:title="@string/showvtfire" /> + \ No newline at end of file