removed globalUsersOnline + some code fixes

This commit is contained in:
gdlbo
2022-08-18 22:24:28 +03:00
parent 3c9a787a77
commit c4d77e40f4
13 changed files with 12 additions and 32 deletions
@@ -170,14 +170,9 @@ public class OnlineFormatterHook {
return getString("custom_online") + " " + appname;
}
public static JSONObject onlineHook(JSONObject json, boolean isGlobalHook) throws ParseException, IOException, JSONException {
if (!getBoolValue("onlinefix", false)) return json;
public static JSONObject onlineHook(JSONObject json) throws ParseException, IOException, JSONException {
if (getBoolValue("onlinefix", false)) setOnlineInfo(json);
if (isGlobalHook && !getBoolValue("globalUsersOnline", false)) {
return json;
}
setOnlineInfo(json);
return json;
}
@@ -189,6 +184,7 @@ public class OnlineFormatterHook {
} catch (Exception e) {
Log.e("onlineHookProfiles", e.getMessage());
}
return jsonArr;
}
@@ -152,10 +152,6 @@ public class Preferences {
return getBoolValue("calls", false);
}
public static boolean globalUsersOnline() {
return getBoolValue("globalUsersOnline", false);
}
public static boolean dev() {
return getBoolValue("dev", false);
}
-5
View File
@@ -98,11 +98,6 @@
android:key="onlinefix"
android:summary="@string/onlinefix_summ"
android:title="@string/onlinefix_title" />
<com.vtosters.lite.ui.MaterialSwitchPreference
android:defaultValue="false"
android:key="globalUsersOnline"
android:summary="@string/globalUsersOnline_summ"
android:title="@string/globalUsersOnline_title" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/privacy_vtl">
<com.vtosters.lite.ui.MaterialSwitchPreference
@@ -82,8 +82,8 @@
move-result-object p1
invoke-static {p1}, Lru/vtosters/lite/hooks/OnlineFormatterHook;->onlineHookProfiles(Lorg/json/JSONObject;)Lorg/json/JSONObject;
move-result-object p1
const-string v0, "items"
@@ -187,9 +187,11 @@
move-result-object p1
invoke-static {p1}, Lru/vtosters/lite/hooks/OnlineFormatterHook;->onlineHookProfiles(Lorg/json/JSONObject;)Lorg/json/JSONObject;
move-result-object p1
invoke-static {p1}, Lru/vtosters/lite/hooks/OnlineFormatterHook;->onlineHookItems(Lorg/json/JSONObject;)Lorg/json/JSONObject;
move-result-object p1
return-object p1
@@ -58,6 +58,7 @@
move-result-object p1
invoke-static {p1}, Lru/vtosters/lite/hooks/OnlineFormatterHook;->onlineHookRequestsAndRecommendations(Lorg/json/JSONObject;)Lorg/json/JSONObject;
move-result-object p1
const-string v1, "r.getJSONObject(\"response\")"
@@ -185,6 +185,7 @@
move-result-object p1
invoke-static {p1}, Lru/vtosters/lite/hooks/OnlineFormatterHook;->onlineHookItems(Lorg/json/JSONObject;)Lorg/json/JSONObject;
move-result-object p1
const-string v0, "r.getJSONArray(\"response\u20260).getJSONObject(\"users\")"
@@ -2928,12 +2928,6 @@
.method public static d(Lorg/json/JSONObject;)Lcom/vk/dto/user/OnlineInfo;
.locals 12
const v2, 0x1
invoke-static {p0, v2}, Lru/vtosters/lite/hooks/OnlineFormatterHook;->onlineHook(Lorg/json/JSONObject;Z)Lorg/json/JSONObject;
move-result-object p0
.line 1
sget-object v0, Lcom/vk/dto/user/VisibleStatus;->e:Lcom/vk/dto/user/VisibleStatus;
@@ -51,6 +51,7 @@
move-result-object p1
invoke-static {p1}, Lru/vtosters/lite/hooks/OnlineFormatterHook;->onlineHookProfiles(Lorg/json/JSONObject;)Lorg/json/JSONObject;
move-result-object p1
const-string v0, "items"
@@ -51,6 +51,7 @@
move-result-object p1
invoke-static {p1}, Lru/vtosters/lite/hooks/OnlineFormatterHook;->onlineHookProfiles(Lorg/json/JSONObject;)Lorg/json/JSONObject;
move-result-object p1
const-string v0, "items"
@@ -666,12 +666,6 @@
.method private final d(Lorg/json/JSONObject;)Lcom/vk/dto/user/OnlineInfo;
.locals 7
const v2, 0x1
invoke-static {p1, v2}, Lru/vtosters/lite/hooks/OnlineFormatterHook;->onlineHook(Lorg/json/JSONObject;Z)Lorg/json/JSONObject;
move-result-object p1
const-string v0, "online_info"
.line 1
@@ -65,6 +65,7 @@
move-result-object p1
invoke-static {p1}, Lru/vtosters/lite/hooks/OnlineFormatterHook;->onlineHookList(Lorg/json/JSONArray;)Lorg/json/JSONArray;
move-result-object p1
.line 3
@@ -133,9 +133,7 @@
move-object/from16 v1, p2
const v2, 0x0
invoke-static {v1, v2}, Lru/vtosters/lite/hooks/OnlineFormatterHook;->onlineHook(Lorg/json/JSONObject;Z)Lorg/json/JSONObject;
invoke-static {v1}, Lru/vtosters/lite/hooks/OnlineFormatterHook;->onlineHook(Lorg/json/JSONObject;)Lorg/json/JSONObject;
move-result-object v1