From 1b4aa0fcc6b89acd4156e93685b1da7519aa7148 Mon Sep 17 00:00:00 2001 From: johnconner122 <107796137+johnconner122@users.noreply.github.com> Date: Mon, 8 May 2023 04:57:37 +0500 Subject: [PATCH] feat(youtube/hide-player-overlay): make it toggleable in settings (#382) --- .../integrations/patches/HidePlayerOverlayPatch.java | 12 ++++++++++++ .../revanced/integrations/settings/SettingsEnum.java | 1 + 2 files changed, 13 insertions(+) create mode 100644 app/src/main/java/app/revanced/integrations/patches/HidePlayerOverlayPatch.java diff --git a/app/src/main/java/app/revanced/integrations/patches/HidePlayerOverlayPatch.java b/app/src/main/java/app/revanced/integrations/patches/HidePlayerOverlayPatch.java new file mode 100644 index 00000000..e734fb24 --- /dev/null +++ b/app/src/main/java/app/revanced/integrations/patches/HidePlayerOverlayPatch.java @@ -0,0 +1,12 @@ +package app.revanced.integrations.patches; + +import android.widget.ImageView; + +import app.revanced.integrations.settings.SettingsEnum; + +public class HidePlayerOverlayPatch { + public static void hidePlayerOverlay(ImageView view) { + if (!SettingsEnum.HIDE_PLAYER_OVERLAY.getBoolean()) return; + view.setImageResource(android.R.color.transparent); + } +} 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 224ab7ea..8b65f085 100644 --- a/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java +++ b/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java @@ -93,6 +93,7 @@ public enum SettingsEnum { 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_PLAYER_OVERLAY("revanced_hide_player_overlay", BOOLEAN, FALSE, true), HIDE_PREVIEW_COMMENT("revanced_hide_preview_comment", BOOLEAN, FALSE, true), HIDE_SEEKBAR("revanced_hide_seekbar", BOOLEAN, FALSE), HIDE_HOME_BUTTON("revanced_hide_home_button", BOOLEAN, FALSE, true),