diff --git a/app/src/main/java/app/revanced/integrations/youtube/patches/HideFloatingMicrophoneButtonPatch.java b/app/src/main/java/app/revanced/integrations/youtube/patches/HideFloatingMicrophoneButtonPatch.java deleted file mode 100644 index c2074ba6a1..0000000000 --- a/app/src/main/java/app/revanced/integrations/youtube/patches/HideFloatingMicrophoneButtonPatch.java +++ /dev/null @@ -1,10 +0,0 @@ -package app.revanced.integrations.youtube.patches; - -import app.revanced.integrations.youtube.settings.Settings; - -@SuppressWarnings("unused") -public final class HideFloatingMicrophoneButtonPatch { - public static boolean hideFloatingMicrophoneButton(final boolean original) { - return Settings.HIDE_FLOATING_MICROPHONE_BUTTON.get() || original; - } -} 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 c50e2a608c..415b7d8c8e 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 @@ -397,6 +397,38 @@ public static void hideCrowdfundingBox(View view) { Utils.hideViewBy0dpUnderCondition(Settings.HIDE_CROWDFUNDING_BOX, view); } + /** + * Injection point. + */ + public static boolean hideFloatingMicrophoneButton(final boolean original) { + return original || Settings.HIDE_FLOATING_MICROPHONE_BUTTON.get(); + } + + /** + * Injection point. + */ + public static int hideInFeed(final int height) { + return Settings.HIDE_FILTER_BAR_FEED_IN_FEED.get() + ? 0 + : height; + } + + /** + * Injection point. + */ + public static int hideInSearch(int height) { + return Settings.HIDE_FILTER_BAR_FEED_IN_SEARCH.get() + ? 0 + : height; + } + + /** + * Injection point. + */ + public static void hideInRelatedVideos(View chipView) { + Utils.hideViewBy0dpUnderCondition(Settings.HIDE_FILTER_BAR_FEED_IN_RELATED_VIDEOS, chipView); + } + private static final boolean HIDE_DOODLES_ENABLED = Settings.HIDE_DOODLES.get(); /**