Skip to content
This repository was archived by the owner on Oct 26, 2024. It is now read-only.

Commit 96d427f

Browse files
author
OxrxL
authored
fix: pull down to reload the home page (#129)
1 parent b68f8e9 commit 96d427f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

app/src/main/java/app/revanced/integrations/patches/GeneralBytecodeAdsPatch.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ public static boolean containsAd(String value, ByteBuffer buffer) {
2020
}
2121

2222
private static boolean containsLithoAd(String value, ByteBuffer buffer) {
23+
String readableBuffer = new String(buffer.array(), StandardCharsets.UTF_8);
24+
2325
boolean enabled = false;
2426
for (SettingsEnum setting : SettingsEnum.getAdRemovalSettings()) {
2527
if (setting.getBoolean()) {
@@ -58,8 +60,8 @@ private static boolean containsLithoAd(String value, ByteBuffer buffer) {
5860

5961
bufferBlockList.add("YouTube Movies");
6062
}
61-
if (containsAny(value, "home_video_with_context", "related_video_with_context") &&
62-
bufferBlockList.stream().anyMatch(new String(buffer.array(), StandardCharsets.UTF_8)::contains)
63+
if (containsAny(readableBuffer, "home_video_with_context", "related_video_with_context") &&
64+
bufferBlockList.stream().anyMatch(readableBuffer::contains)
6365
) return true;
6466

6567
if (SettingsEnum.ADREMOVER_COMMENTS_REMOVAL.getBoolean()) {

0 commit comments

Comments
 (0)