diff --git a/app/src/main/java/app/revanced/integrations/patches/ChangeStartPagePatch.java b/app/src/main/java/app/revanced/integrations/patches/ChangeStartPagePatch.java new file mode 100644 index 00000000..ede239a3 --- /dev/null +++ b/app/src/main/java/app/revanced/integrations/patches/ChangeStartPagePatch.java @@ -0,0 +1,16 @@ +package app.revanced.integrations.patches; + +import android.content.Intent; +import app.revanced.integrations.settings.SettingsEnum; +import app.revanced.integrations.utils.LogHelper; + +@SuppressWarnings("unused") +public final class ChangeStartPagePatch { + public static void changeIntent(Intent intent) { + final var startPage = SettingsEnum.START_PAGE.getString(); + if (startPage.isEmpty()) return; + + LogHelper.printDebug(() -> "Changing start page to " + startPage); + intent.setAction("com.google.android.youtube.action." + startPage); + } +} 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 2b18ab78..154c0c4b 100644 --- a/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java +++ b/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java @@ -129,6 +129,8 @@ public enum SettingsEnum { TABLET_LAYOUT("revanced_tablet_layout", BOOLEAN, FALSE, true, "revanced_tablet_layout_user_dialog_message"), USE_TABLET_MINIPLAYER("revanced_tablet_miniplayer", BOOLEAN, FALSE, true), WIDE_SEARCHBAR("revanced_wide_searchbar", BOOLEAN, FALSE, true), + START_PAGE("revanced_start_page", STRING, ""), + // Description HIDE_CHAPTERS("revanced_hide_chapters", BOOLEAN, TRUE), HIDE_INFO_CARDS_SECTION("revanced_hide_info_cards_section", BOOLEAN, TRUE),