fix(YouTube - Change start page): Add option to always override start page on app launch (#4832)
This commit is contained in:

committed by
GitHub

parent
ee9039428c
commit
5062e24433
@ -7,6 +7,9 @@ import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.patches.all.misc.resources.addResources
|
||||
import app.revanced.patches.all.misc.resources.addResourcesPatch
|
||||
import app.revanced.patches.shared.misc.settings.preference.ListPreference
|
||||
import app.revanced.patches.shared.misc.settings.preference.PreferenceCategory
|
||||
import app.revanced.patches.shared.misc.settings.preference.PreferenceScreenPreference.Sorting
|
||||
import app.revanced.patches.shared.misc.settings.preference.SwitchPreference
|
||||
import app.revanced.patches.youtube.misc.extension.sharedExtensionPatch
|
||||
import app.revanced.patches.youtube.misc.settings.PreferenceScreen
|
||||
import app.revanced.patches.youtube.misc.settings.settingsPatch
|
||||
@ -43,10 +46,18 @@ val changeStartPagePatch = bytecodePatch(
|
||||
addResources("youtube", "layout.startpage.changeStartPagePatch")
|
||||
|
||||
PreferenceScreen.GENERAL_LAYOUT.addPreferences(
|
||||
ListPreference(
|
||||
key = "revanced_change_start_page",
|
||||
summaryKey = null,
|
||||
),
|
||||
PreferenceCategory(
|
||||
titleKey = null,
|
||||
sorting = Sorting.UNSORTED,
|
||||
tag = "app.revanced.extension.shared.settings.preference.NoTitlePreferenceCategory",
|
||||
preferences = setOf(
|
||||
ListPreference(
|
||||
key = "revanced_change_start_page",
|
||||
summaryKey = null,
|
||||
),
|
||||
SwitchPreference("revanced_change_start_page_always")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
// Hook browseId.
|
||||
|
Reference in New Issue
Block a user