From 7da9d440eedfc895b49aac40498f0279156ad117 Mon Sep 17 00:00:00 2001 From: johnconner122 <107796137+johnconner122@users.noreply.github.com> Date: Sun, 7 May 2023 20:26:56 +0500 Subject: [PATCH] feat(youtube): `hide-load-more-button` patch (#389) --- .../patches/HideLoadMoreButtonPatch.java | 13 +++++++++++++ .../integrations/settings/SettingsEnum.java | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 app/src/main/java/app/revanced/integrations/patches/HideLoadMoreButtonPatch.java diff --git a/app/src/main/java/app/revanced/integrations/patches/HideLoadMoreButtonPatch.java b/app/src/main/java/app/revanced/integrations/patches/HideLoadMoreButtonPatch.java new file mode 100644 index 00000000..5b23bebe --- /dev/null +++ b/app/src/main/java/app/revanced/integrations/patches/HideLoadMoreButtonPatch.java @@ -0,0 +1,13 @@ +package app.revanced.integrations.patches; + +import android.view.View; + +import app.revanced.integrations.adremover.AdRemoverAPI; +import app.revanced.integrations.settings.SettingsEnum; + +public class HideLoadMoreButtonPatch { + public static void hideLoadMoreButton(View view){ + if(!SettingsEnum.HIDE_LOAD_MORE_BUTTON.getBoolean()) return; + AdRemoverAPI.HideViewWithLayout1dp(view); + } +} diff --git a/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java b/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java index 1506c3f6..224ab7ea 100644 --- a/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java +++ b/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java @@ -91,6 +91,7 @@ public enum SettingsEnum { HIDE_FULLSCREEN_PANELS("revanced_hide_fullscreen_panels", BOOLEAN, TRUE), HIDE_GET_PREMIUM("revanced_hide_get_premium", BOOLEAN, TRUE), HIDE_INFO_CARDS("revanced_hide_infocards", BOOLEAN, TRUE), + HIDE_LOAD_MORE_BUTTON("revanced_hide_load_more_button", BOOLEAN, TRUE, true), HIDE_PLAYER_BUTTONS("revanced_hide_player_buttons", BOOLEAN, FALSE), HIDE_PREVIEW_COMMENT("revanced_hide_preview_comment", BOOLEAN, FALSE, true), HIDE_SEEKBAR("revanced_hide_seekbar", BOOLEAN, FALSE), @@ -429,4 +430,4 @@ public enum SettingsEnum { LONG, FLOAT, } -} \ No newline at end of file +}