Skip to content

Commit

Permalink
feat(YouTube): Add Change start page patch
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Dec 11, 2023
1 parent 8870f7a commit 792dc0c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
@@ -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);
}
}
Expand Up @@ -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),
Expand Down

0 comments on commit 792dc0c

Please sign in to comment.