From 21d9c13fdf69ab9291af9632d8a885577735f302 Mon Sep 17 00:00:00 2001
From: gdlbo <41114720+gdlbo@users.noreply.github.com>
Date: Thu, 21 Jul 2022 12:50:46 +0300
Subject: [PATCH] convBarRecomm
---
.../main/java/ru/vtosters/lite/hooks/JsonInjectors.java | 9 +++++++--
smali/res/xml/preferences_messages.xml | 5 +++++
2 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/app/src/main/java/ru/vtosters/lite/hooks/JsonInjectors.java b/app/src/main/java/ru/vtosters/lite/hooks/JsonInjectors.java
index 6da8291e5..bd4a46d03 100644
--- a/app/src/main/java/ru/vtosters/lite/hooks/JsonInjectors.java
+++ b/app/src/main/java/ru/vtosters/lite/hooks/JsonInjectors.java
@@ -58,7 +58,6 @@ public class JsonInjectors{
}
public static JSONObject convBar(JSONObject orig) throws JSONException{
- if (!dev()) return orig.optJSONObject("conversation_bar"); // TODO Make it server-side
var peerid = Objects.requireNonNull(orig.optJSONObject("peer")).optInt("id");
var pic = "https://image.pngaaa.com/641/326641-middle.png"; // can be null
@@ -82,7 +81,13 @@ public class JsonInjectors{
if (isVerified(peerid)) text = "Я купил VTosters Premium";
if (isPrometheus(peerid)) text = "Я купил VTosters Premium Gold Prime Pro Plus";
if (isDeveloper(peerid)) text = "Я создал говно";
- if (!isVerified(peerid) || text.equals("")) return orig.optJSONObject("conversation_bar");
+ if (!isVerified(peerid) || text.equals("")) {
+ if (getBoolValue("convBarRecomm", false)) {
+ return null;
+ } else {
+ return orig.optJSONObject("conversation_bar");
+ }
+ }
// JSONObject("{\"name\":\"group_admin_welcome\",\"text\":\"" + textverif + "\",\"buttons\":[],\"icon\":\"" + pic + "\"}");
return new JSONObject(decode("eyJuYW1lIjoiZ3JvdXBfYWRtaW5fd2VsY29tZSIsInRleHQiOiI=")
diff --git a/smali/res/xml/preferences_messages.xml b/smali/res/xml/preferences_messages.xml
index 0e83592e2..38204a01d 100644
--- a/smali/res/xml/preferences_messages.xml
+++ b/smali/res/xml/preferences_messages.xml
@@ -9,6 +9,11 @@
android:key="voice"
android:summary="@string/vtlvoicesummary"
android:title="@string/vtlvoice" />
+