fixed links + disable recomms

This commit is contained in:
gdlbo
2022-06-04 20:36:00 +03:00
parent 8b26b12813
commit ebf7baaa65
3 changed files with 15 additions and 6 deletions
@@ -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";
}
}
@@ -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;
}
+4
View File
@@ -68,5 +68,9 @@
android:defaultValue="true"
android:key="VT_Fire"
android:title="@string/showvtfire" />
<com.vtosters.lite.ui.MaterialSwitchPreference
android:defaultValue="false"
android:key="donaterecomm"
android:title="Отключить рекомендации о донате" />
</PreferenceCategory>
</PreferenceScreen>