From 149a90a2e8711a95ec4a310c7ba1e8f0ef6a218f Mon Sep 17 00:00:00 2001 From: OxrxL <108184954+OxrxL@users.noreply.github.com> Date: Thu, 29 Sep 2022 23:54:09 +0200 Subject: [PATCH] feat: `disable-startup-shorts-player` patch (#164) --- .../patches/DisableStartupShortsPlayerPatch.java | 10 ++++++++++ .../revanced/integrations/settings/SettingsEnum.java | 1 + 2 files changed, 11 insertions(+) create mode 100644 app/src/main/java/app/revanced/integrations/patches/DisableStartupShortsPlayerPatch.java diff --git a/app/src/main/java/app/revanced/integrations/patches/DisableStartupShortsPlayerPatch.java b/app/src/main/java/app/revanced/integrations/patches/DisableStartupShortsPlayerPatch.java new file mode 100644 index 00000000..d0ee7d93 --- /dev/null +++ b/app/src/main/java/app/revanced/integrations/patches/DisableStartupShortsPlayerPatch.java @@ -0,0 +1,10 @@ +package app.revanced.integrations.patches; + +import app.revanced.integrations.settings.SettingsEnum; + +public class DisableStartupShortsPlayerPatch { + //Used by app.revanced.patches.youtube.layout.startupshortsreset.patch.DisableShortsOnStartupPatch + public static boolean disableStartupShortsPlayer() { + return SettingsEnum.DISABLE_STARTUP_SHORTS_PLAYER.getBoolean(); + } +} 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 60383c5c..79aa2a5e 100644 --- a/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java +++ b/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java @@ -60,6 +60,7 @@ public enum SettingsEnum { PLAYER_POPUP_PANELS("revanced_player_popup_panels_enabled", false, ReturnType.BOOLEAN), HIDE_TIME_AND_SEEKBAR("revanced_hide_time_and_seekbar", false, ReturnType.BOOLEAN), HIDE_EMAIL_ADDRESS("revanced_hide_email_address", false, ReturnType.BOOLEAN), + DISABLE_STARTUP_SHORTS_PLAYER("revanced_startup_shorts_player_enabled", false, ReturnType.BOOLEAN), //Misc. Settings CAPTIONS_ENABLED("revanced_autocaptions_enabled", false, ReturnType.BOOLEAN, false),