mirror of
https://github.com/revanced/revanced-integrations.git
synced 2025-01-08 11:05:49 +01:00
fix(reddit/hide-ads): only filter promoted links
This commit is contained in:
parent
8d0d5f9659
commit
efc2b9b6a3
@ -13,12 +13,9 @@ public final class FilterPromotedLinksPatch {
|
|||||||
final List<Object> filteredList = new ArrayList<>();
|
final List<Object> filteredList = new ArrayList<>();
|
||||||
|
|
||||||
for (Object item : links) {
|
for (Object item : links) {
|
||||||
if (!(item instanceof ILink)) continue;
|
if (item instanceof ILink && ((ILink) item).getPromoted()) continue;
|
||||||
|
|
||||||
final var link = (ILink) item;
|
filteredList.add(item);
|
||||||
final var isPromotedAd = link.getPromoted();
|
|
||||||
|
|
||||||
if (!isPromotedAd) filteredList.add(item);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return filteredList;
|
return filteredList;
|
||||||
|
Loading…
Reference in New Issue
Block a user