removed legacy ad remover
This commit is contained in:
@@ -497,7 +497,6 @@ public class JsonInjectors {
|
||||
}
|
||||
|
||||
public static JSONArray newsfeedadtest(JSONArray items) throws JSONException {
|
||||
if (!getBoolValue("newadblock", true)) return items;
|
||||
var newItems = new JSONArray();
|
||||
|
||||
for (int j = 0; j < items.length(); j++) {
|
||||
|
||||
@@ -37,33 +37,6 @@ import java.util.List;
|
||||
import ru.vtosters.lite.utils.AccountManagerUtils;
|
||||
|
||||
public class NewsfeedHook {
|
||||
public static boolean injectFilters(JSONObject obj) throws JSONException {
|
||||
if (getBoolValue("newadblock", true)) return true;
|
||||
|
||||
var optString = obj.optString("type", "");
|
||||
if (isAds(optString) || isAuthorRecommendations(optString) || isPostRecommendations(optString) || isFriendsRecommendations(optString) || isRecomsGroup(optString) || isMusicBlock(optString) || isNewsBlock(optString)) {
|
||||
return false;
|
||||
}
|
||||
optString = obj.optString("post_type", "");
|
||||
if (isAds(optString) || isAuthorRecommendations(optString) || isPostRecommendations(optString) || isFriendsRecommendations(optString) || isMusicBlock(optString) || isNewsBlock(optString)) {
|
||||
return false;
|
||||
}
|
||||
optString = obj.optString("filters", "");
|
||||
if (isAds(optString) || isAuthorRecommendations(optString) || isPostRecommendations(optString) || isFriendsRecommendations(optString)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (checkCopyright(obj)) return false;
|
||||
|
||||
if (isBadNews(obj.optString("text", ""))) return false;
|
||||
|
||||
if (checkCaption(obj)) return false;
|
||||
|
||||
if (isGroupAds(obj)) return false;
|
||||
|
||||
return !injectFiltersReposts(obj);
|
||||
} // inject our filters to newsfeed, getpost and discover
|
||||
|
||||
public static long getUpdateNewsfeed(boolean refresh_timeout) {
|
||||
if (vkme()) {
|
||||
return MAX_VALUE;
|
||||
|
||||
@@ -8,7 +8,6 @@ import static ru.vtosters.lite.utils.AndroidUtils.sendToast;
|
||||
import static ru.vtosters.lite.utils.Preferences.getBoolValue;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.view.View;
|
||||
|
||||
@@ -5651,7 +5651,6 @@
|
||||
<string name="screenshotdetect_summ">Отключить уведомление о том, что вы сделали скриншот</string>
|
||||
<string name="hideDeviceInfo_title">Отключить отправку метрики</string>
|
||||
<string name="hideDeviceInfo_summ">Отключить отправку информации об устройстве пользователя и вашем местоположении</string>
|
||||
<string name="newadblock_title">Использовать новый AdBlock (Beta)</string>
|
||||
<string name="podcastcatalog_title">Добавить каталог подкастов</string>
|
||||
<string name="useNewSettings_title">Использовать новые настройки</string>
|
||||
<string name="musicFixNew_title">Фикс музыки v2</string>
|
||||
|
||||
@@ -5785,7 +5785,6 @@ You need to restart the application to apply proxy settings"</string>
|
||||
<string name="screenshotdetect_summ">Turn off the notification that you took a screenshot</string>
|
||||
<string name="hideDeviceInfo_title">Disable sending metric</string>
|
||||
<string name="hideDeviceInfo_summ">Disable sending information about the user\'s device and your location</string>
|
||||
<string name="newadblock_title">Use new AdBlock (Beta)</string>
|
||||
<string name="podcastcatalog_title">Add podcast catalog</string>
|
||||
<string name="useNewSettings_title">Use new settings</string>
|
||||
<string name="musicFixNew_title">Music fix v2</string>
|
||||
|
||||
@@ -22,10 +22,6 @@
|
||||
android:key="calls"
|
||||
android:summary="@string/messages_interface_calls_summary"
|
||||
android:title="@string/vtlcalls" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="true"
|
||||
android:key="newadblock"
|
||||
android:title="@string/newadblock_title" />
|
||||
<com.vtosters.lite.ui.MaterialSwitchPreference
|
||||
android:defaultValue="false"
|
||||
android:key="podcastcatalog"
|
||||
|
||||
@@ -122,17 +122,6 @@
|
||||
|
||||
move-result-object v10
|
||||
|
||||
invoke-static {v10}, Lru/vtosters/lite/hooks/NewsfeedHook;->injectFilters(Lorg/json/JSONObject;)Z
|
||||
|
||||
move-result v11
|
||||
|
||||
if-nez v11, :cond_229
|
||||
|
||||
add-int/lit8 v9, v9, 0x1
|
||||
|
||||
goto :goto_0
|
||||
|
||||
:cond_229
|
||||
if-eqz v10, :cond_0
|
||||
|
||||
.line 7
|
||||
@@ -539,19 +528,6 @@
|
||||
|
||||
move-object/from16 v21, v5
|
||||
|
||||
invoke-static {v13}, Lru/vtosters/lite/hooks/NewsfeedHook;->injectFilters(Lorg/json/JSONObject;)Z
|
||||
|
||||
move-result v16
|
||||
|
||||
if-nez v16, :cond_228
|
||||
|
||||
add-int/lit8 v12, v12, 0x1
|
||||
|
||||
move-object/from16 v5, v21
|
||||
|
||||
goto :goto_7
|
||||
|
||||
:cond_228
|
||||
if-eqz v13, :cond_c
|
||||
|
||||
.line 34
|
||||
|
||||
@@ -65,17 +65,6 @@
|
||||
|
||||
move-result-object v2
|
||||
|
||||
invoke-static {v2}, Lru/vtosters/lite/hooks/NewsfeedHook;->injectFilters(Lorg/json/JSONObject;)Z
|
||||
|
||||
move-result v10
|
||||
|
||||
if-nez v10, :cond_2
|
||||
|
||||
add-int/lit8 v0, v0, 0x1
|
||||
|
||||
goto :goto_0
|
||||
|
||||
:cond_2
|
||||
if-eqz v2, :cond_0
|
||||
|
||||
.line 47
|
||||
@@ -242,17 +231,6 @@
|
||||
|
||||
move-result-object v2
|
||||
|
||||
invoke-static {v2}, Lru/vtosters/lite/hooks/NewsfeedHook;->injectFilters(Lorg/json/JSONObject;)Z
|
||||
|
||||
move-result v10
|
||||
|
||||
if-nez v10, :cond_2
|
||||
|
||||
add-int/lit8 v0, v0, 0x1
|
||||
|
||||
goto :goto_0
|
||||
|
||||
:cond_2
|
||||
if-eqz v2, :cond_0
|
||||
|
||||
.line 3
|
||||
|
||||
@@ -187,19 +187,6 @@
|
||||
|
||||
move-result-object v7
|
||||
|
||||
invoke-static {v7}, Lru/vtosters/lite/hooks/NewsfeedHook;->injectFilters(Lorg/json/JSONObject;)Z
|
||||
|
||||
move-result v9
|
||||
|
||||
if-nez v9, :cond_99
|
||||
|
||||
add-int/lit8 v3, v3, 0x1
|
||||
|
||||
goto :goto_4
|
||||
|
||||
:cond_99
|
||||
|
||||
|
||||
invoke-static {v7, v2}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
||||
|
||||
.line 16
|
||||
|
||||
@@ -251,19 +251,6 @@
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-static {v0}, Lru/vtosters/lite/hooks/NewsfeedHook;->injectFilters(Lorg/json/JSONObject;)Z
|
||||
|
||||
move-result v15
|
||||
|
||||
if-nez v15, :cond_99
|
||||
|
||||
add-int/lit8 v10, v10, 0x1
|
||||
|
||||
goto :goto_5
|
||||
|
||||
:cond_99
|
||||
|
||||
|
||||
invoke-static {v0, v6}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
||||
|
||||
.line 22
|
||||
|
||||
@@ -131,17 +131,6 @@
|
||||
|
||||
move-result-object v7
|
||||
|
||||
invoke-static {v7}, Lru/vtosters/lite/hooks/NewsfeedHook;->injectFilters(Lorg/json/JSONObject;)Z
|
||||
|
||||
move-result v10
|
||||
|
||||
if-nez v10, :cond_28
|
||||
|
||||
add-int/lit8 v5, v5, 0x1
|
||||
|
||||
goto :goto_0
|
||||
|
||||
:cond_28
|
||||
const-string v9, "profiles.getJSONObject(i)"
|
||||
|
||||
invoke-static {v7, v9}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
||||
@@ -179,17 +168,6 @@
|
||||
|
||||
move-result-object v6
|
||||
|
||||
invoke-static {v6}, Lru/vtosters/lite/hooks/NewsfeedHook;->injectFilters(Lorg/json/JSONObject;)Z
|
||||
|
||||
move-result v10
|
||||
|
||||
if-nez v10, :cond_29
|
||||
|
||||
add-int/lit8 v4, v4, 0x1
|
||||
|
||||
goto :goto_1
|
||||
|
||||
:cond_29
|
||||
const-string v7, "groups.getJSONObject(i)"
|
||||
|
||||
invoke-static {v6, v7}, Lkotlin/jvm/internal/Intrinsics;->a(Ljava/lang/Object;Ljava/lang/String;)V
|
||||
@@ -227,17 +205,6 @@
|
||||
|
||||
move-result-object p3
|
||||
|
||||
invoke-static {p3}, Lru/vtosters/lite/hooks/NewsfeedHook;->injectFilters(Lorg/json/JSONObject;)Z
|
||||
|
||||
move-result v10
|
||||
|
||||
if-nez v10, :cond_30
|
||||
|
||||
add-int/lit8 v3, v3, 0x1
|
||||
|
||||
goto :goto_2
|
||||
|
||||
:cond_30
|
||||
invoke-virtual {p3, v0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
||||
|
||||
move-result-object v4
|
||||
|
||||
@@ -749,21 +749,10 @@
|
||||
|
||||
move-result-object v2
|
||||
|
||||
invoke-static {v2}, Lru/vtosters/lite/hooks/NewsfeedHook;->injectFilters(Lorg/json/JSONObject;)Z
|
||||
|
||||
move-result v10
|
||||
|
||||
if-nez v10, :cond_70
|
||||
|
||||
add-int/lit8 v5, v5, 0x1
|
||||
|
||||
goto :goto_2
|
||||
|
||||
:try_end_0
|
||||
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
|
||||
|
||||
.line 39
|
||||
:cond_70
|
||||
:try_start_1
|
||||
iget-object v3, p0, Lcom/vtosters/lite/api/newsfeed/NewsfeedGet;->H:Ljava/lang/String;
|
||||
|
||||
|
||||
@@ -380,17 +380,6 @@
|
||||
|
||||
move-result-object v6
|
||||
|
||||
invoke-static {v6}, Lru/vtosters/lite/hooks/NewsfeedHook;->injectFilters(Lorg/json/JSONObject;)Z
|
||||
|
||||
move-result v9
|
||||
|
||||
if-nez v9, :cond_71
|
||||
|
||||
add-int/lit8 v3, v3, 0x1
|
||||
|
||||
goto :goto_3
|
||||
|
||||
:cond_71
|
||||
invoke-static {v6}, Lcom/vk/dto/newsfeed/Owner;->b(Lorg/json/JSONObject;)Lcom/vk/dto/newsfeed/Owner;
|
||||
|
||||
move-result-object v6
|
||||
@@ -431,19 +420,6 @@
|
||||
|
||||
move-result-object v6
|
||||
|
||||
invoke-static {v6}, Lru/vtosters/lite/hooks/NewsfeedHook;->injectFilters(Lorg/json/JSONObject;)Z
|
||||
|
||||
move-result v9
|
||||
|
||||
if-nez v9, :cond_70
|
||||
|
||||
add-int/lit8 v3, v3, 0x1
|
||||
|
||||
goto :goto_3
|
||||
|
||||
:cond_70
|
||||
|
||||
|
||||
invoke-static {v4, v6, p1, v1}, Lcom/vk/dto/newsfeed/entries/NewsEntryFactory;->a(Ljava/lang/String;Lorg/json/JSONObject;Landroid/util/SparseArray;Ljava/lang/String;)Lcom/vk/dto/newsfeed/entries/NewsEntry;
|
||||
|
||||
move-result-object v4
|
||||
|
||||
@@ -351,7 +351,7 @@
|
||||
|
||||
# virtual methods
|
||||
.method public a(Lorg/json/JSONObject;)Lcom/vtosters/lite/api/wall/WallGet$Result;
|
||||
.locals 11
|
||||
.locals 10
|
||||
.annotation system Ldalvik/annotation/Throws;
|
||||
value = {
|
||||
Ljava/lang/Exception;
|
||||
@@ -539,21 +539,10 @@
|
||||
|
||||
move-result-object v8
|
||||
|
||||
invoke-static {v8}, Lru/vtosters/lite/hooks/NewsfeedHook;->injectFilters(Lorg/json/JSONObject;)Z
|
||||
|
||||
move-result v10
|
||||
|
||||
if-nez v10, :cond_70
|
||||
|
||||
add-int/lit8 v4, v4, 0x1
|
||||
|
||||
goto :goto_2
|
||||
|
||||
:try_end_1
|
||||
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_2
|
||||
|
||||
.line 21
|
||||
:cond_70
|
||||
:try_start_2
|
||||
iget-object v9, p0, Lcom/vtosters/lite/api/wall/WallGet;->F:Ljava/lang/String;
|
||||
|
||||
|
||||
@@ -105,17 +105,6 @@
|
||||
|
||||
move-result-object v2
|
||||
|
||||
invoke-static {v2}, Lru/vtosters/lite/hooks/NewsfeedHook;->injectFilters(Lorg/json/JSONObject;)Z
|
||||
|
||||
move-result v5
|
||||
|
||||
if-nez v5, :cond_70
|
||||
|
||||
add-int/lit8 v1, v1, 0x1
|
||||
|
||||
goto :goto_0
|
||||
|
||||
:cond_70
|
||||
const-string v3, "type"
|
||||
|
||||
const-string v4, "post"
|
||||
|
||||
Reference in New Issue
Block a user