fix(reddit/hide-ads): only filter promoted links

This commit is contained in:
oSumAtrIX 2023-06-16 23:25:44 +02:00
parent 8d0d5f9659
commit efc2b9b6a3
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -13,12 +13,9 @@ public final class FilterPromotedLinksPatch {
final List<Object> filteredList = new ArrayList<>();
for (Object item : links) {
if (!(item instanceof ILink)) continue;
if (item instanceof ILink && ((ILink) item).getPromoted()) continue;
final var link = (ILink) item;
final var isPromotedAd = link.getPromoted();
if (!isPromotedAd) filteredList.add(item);
filteredList.add(item);
}
return filteredList;