fixed init filters

This commit is contained in:
gdlbo
2023-01-01 18:43:05 +03:00
parent 40a1ab64cb
commit 1a7031ead1
3 changed files with 9 additions and 5 deletions
@@ -231,10 +231,14 @@ public class AdBlockHook {
continue; continue;
} }
if (NewsFeedFiltersUtils.injectFiltersReposts(list) && !isWhitelistedFilters(list)) { try {
if (dev()) if (NewsFeedFiltersUtils.injectFiltersReposts(list) && !isWhitelistedFilters(list)) {
Log.d("NewsfeedAdBlockV2", "Removed post " + list.optInt("post_id") + " from feed, Reason: repost ad"); if (dev())
continue; Log.d("NewsfeedAdBlockV2", "Removed post " + list.optInt("post_id") + " from feed, Reason: repost ad");
continue;
}
} catch (Exception ex) {
Log.d("RepostInj", ex.getMessage());
} }
newItems.put(list); newItems.put(list);
@@ -135,7 +135,6 @@ public class NewsFeedFiltersUtils {
} }
} }
if (mFiltersLinks != null) { if (mFiltersLinks != null) {
for (String filter : mFiltersLinks) { for (String filter : mFiltersLinks) {
if (copyrightLink != null && copyrightLink.contains(filter)) return true; if (copyrightLink != null && copyrightLink.contains(filter)) return true;
@@ -36,6 +36,7 @@ public class Preferences {
GmsUtils.fixGapps(); GmsUtils.fixGapps();
setProxy(); setProxy();
setupFilters();
VTVerifications.load(application); VTVerifications.load(application);
LifecycleUtils.registerActivities(application); LifecycleUtils.registerActivities(application);
} // VK Init } // VK Init