fix: home ads (#24)

* Ads test

* refactor: cleanup code

Co-authored-by: Sculas <contact@sculas.xyz>
This commit is contained in:
OxrxL 2022-06-27 22:08:24 +02:00 committed by GitHub
parent a2bb4a5f03
commit 0938f6c59f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,12 +114,8 @@ public class LithoAdRemoval {
bufferBlockList.add("YouTube Movies"); bufferBlockList.add("YouTube Movies");
} }
if ((value.contains("home_video_with_context") || value.contains("related_video_with_context")) &&
if ( bufferBlockList.stream().anyMatch(StandardCharsets.UTF_8.decode(buffer).toString()::contains)
value.contains("related_video_with_context") &&
bufferBlockList
.stream()
.anyMatch(StandardCharsets.UTF_8.decode(buffer).toString()::contains)
) return true; ) return true;
if (isExperimentalMerchandiseRemoval()) { if (isExperimentalMerchandiseRemoval()) {
@ -128,7 +124,6 @@ public class LithoAdRemoval {
if (isExperimentalCommunityPostRemoval()) { if (isExperimentalCommunityPostRemoval()) {
blockList.add("post_base_wrapper"); blockList.add("post_base_wrapper");
} }
if (isExperimentalPaidContentRemoval()) { if (isExperimentalPaidContentRemoval()) {
blockList.add("paid_content_overlay"); blockList.add("paid_content_overlay");
} }