mirror of
https://github.com/revanced/revanced-patches
synced 2025-02-19 09:16:49 +01:00
fix(reddit/hide-ads): only filter promoted links
This commit is contained in:
parent
8cce916abb
commit
cbafa92029
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user