From 5492d6944568c7ccba6b8c6429b9f56523fe8b6d Mon Sep 17 00:00:00 2001 From: gdlbo <41114720+gdlbo@users.noreply.github.com> Date: Sat, 4 Jun 2022 21:18:50 +0300 Subject: [PATCH] Added randomize to disable donate alert --- .../java/ru/vtosters/lite/utils/JsonInjectors.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 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 65eef3b34..a172aa6e6 100644 --- a/app/src/main/java/ru/vtosters/lite/utils/JsonInjectors.java +++ b/app/src/main/java/ru/vtosters/lite/utils/JsonInjectors.java @@ -6,6 +6,8 @@ import static ru.vtosters.lite.utils.Preferences.hasVerification; import org.json.JSONException; import org.json.JSONObject; +import java.util.Random; + public class JsonInjectors { public static JSONObject profileButton() throws JSONException { String pic = "https:\\/\\/sun1-18.userapi.com\\/NLd_rNpGuSaBnPV6O-j5mqCGZk8BK8drAMd2LQ\\/5R-DEF37PFs.png"; @@ -36,10 +38,16 @@ public class JsonInjectors { } public static String haveDonateBanner() { - return hasVerification() || donaterecomm() ? "null" : "info"; + Random random = new Random(); + int randomshower = random.nextInt(7); + + return hasVerification() || donaterecomm() || randomshower != 1 ? "null" : "info"; } public static String haveDonateButton() { - return hasVerification() || donaterecomm() ? "null" : "buttons"; + Random random = new Random(); + int randomshower = random.nextInt(5); + + return hasVerification() || donaterecomm() || randomshower != 1 ? "null" : "buttons"; } }