From ef99ff20569bbb359d6b2c50329c3f47fce48626 Mon Sep 17 00:00:00 2001 From: LisoUseInAIKyrios <118716522+LisoUseInAIKyrios@users.noreply.github.com> Date: Mon, 21 Oct 2024 23:34:22 -0400 Subject: [PATCH] fix(YouTube): Merge `Hide crowdfunding box` patch into `Hide layout components` --- .../youtube/patches/HideCrowdfundingBoxPatch.java | 15 --------------- .../components/LayoutComponentsFilter.java | 7 +++++++ 2 files changed, 7 insertions(+), 15 deletions(-) delete mode 100644 app/src/main/java/app/revanced/integrations/youtube/patches/HideCrowdfundingBoxPatch.java diff --git a/app/src/main/java/app/revanced/integrations/youtube/patches/HideCrowdfundingBoxPatch.java b/app/src/main/java/app/revanced/integrations/youtube/patches/HideCrowdfundingBoxPatch.java deleted file mode 100644 index 6546da78de..0000000000 --- a/app/src/main/java/app/revanced/integrations/youtube/patches/HideCrowdfundingBoxPatch.java +++ /dev/null @@ -1,15 +0,0 @@ -package app.revanced.integrations.youtube.patches; - -import android.view.View; - -import app.revanced.integrations.youtube.settings.Settings; -import app.revanced.integrations.shared.Utils; - -@SuppressWarnings("unused") -public class HideCrowdfundingBoxPatch { - //Used by app.revanced.patches.youtube.layout.hidecrowdfundingbox.patch.HideCrowdfundingBoxPatch - public static void hideCrowdfundingBox(View view) { - if (!Settings.HIDE_CROWDFUNDING_BOX.get()) return; - Utils.hideViewByLayoutParams(view); - } -} diff --git a/app/src/main/java/app/revanced/integrations/youtube/patches/components/LayoutComponentsFilter.java b/app/src/main/java/app/revanced/integrations/youtube/patches/components/LayoutComponentsFilter.java index 93b0543a78..c50e2a608c 100644 --- a/app/src/main/java/app/revanced/integrations/youtube/patches/components/LayoutComponentsFilter.java +++ b/app/src/main/java/app/revanced/integrations/youtube/patches/components/LayoutComponentsFilter.java @@ -390,6 +390,13 @@ public static void hideAlbumCard(View view) { Utils.hideViewBy0dpUnderCondition(Settings.HIDE_ALBUM_CARDS, view); } + /** + * Injection point. + */ + public static void hideCrowdfundingBox(View view) { + Utils.hideViewBy0dpUnderCondition(Settings.HIDE_CROWDFUNDING_BOX, view); + } + private static final boolean HIDE_DOODLES_ENABLED = Settings.HIDE_DOODLES.get(); /**