mirror of
https://github.com/revanced/revanced-integrations
synced 2024-11-22 05:02:19 +01:00
feat(YouTube): Add Change start page
patch
This commit is contained in:
parent
8870f7ab0c
commit
792dc0c522
@ -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);
|
||||
}
|
||||
}
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user