From c3e88c79e9e7de0700c4e0ade349e47173002567 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sun, 20 Nov 2022 23:55:15 +0100 Subject: [PATCH] fix(youtube/general-ads): hide bytecode home ad view --- .../revanced/integrations/patches/GeneralAdsPatch.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/main/java/app/revanced/integrations/patches/GeneralAdsPatch.java b/app/src/main/java/app/revanced/integrations/patches/GeneralAdsPatch.java index 4c6c4309..08ea30ed 100644 --- a/app/src/main/java/app/revanced/integrations/patches/GeneralAdsPatch.java +++ b/app/src/main/java/app/revanced/integrations/patches/GeneralAdsPatch.java @@ -136,4 +136,14 @@ public final class GeneralAdsPatch extends Filter { this.message = message; } } + + /** + * Hide the specific view, which shows ads in the homepage. + * + * @param view The view, which shows ads. + */ + public static void hideAdAttributionView(View view) { + if (!SettingsEnum.ADREMOVER_GENERAL_ADS_REMOVAL.getBoolean()) return; + AdRemoverAPI.HideViewWithLayout1dp(view); + } }