fixed ads in discover

This commit is contained in:
gdlbo
2022-06-24 11:43:38 +03:00
parent 8953ee1f7f
commit f7a137537c
4 changed files with 56 additions and 12 deletions
@@ -98,10 +98,10 @@ public class Newsfeed{
return false;
}
checkCopyright(obj);
if(checkCopyright(obj)) return false;
if(isBadNew(obj.optString("text", ""))) return false;
optString = obj.optString("text", "");
if(isBadNew(optString)) return false;
if(checkCaption(obj)) return false;
return !isGroupAds(obj);
@@ -112,7 +112,7 @@ public class Newsfeed{
JSONObject copyright = json.getJSONObject("copyright");
String copyrightlink = copyright.getString("link");
return !copyrightlink.contains("vk.com") || !copyright_post(); // fuck you, it doesn't work to detect link value
return copyrightlink.contains("vk.com") || copyright_post(); // fuck you, it doesn't work to detect link value
// example of response
//"copyright": {
@@ -123,7 +123,7 @@ public class Newsfeed{
//}
}
return true;
return false;
}
private static boolean isRecomsGroup(String src){
@@ -289,10 +289,6 @@ public class Preferences{
return dnr() ? "messages.markAsRead" : "null";
}
public static String copyrightfix(){
return copyright_post() ? "copyright" : "ads_easy_promote";
}
public static boolean refsfilter(){
return getBoolValue("refsfilter", false);
}