feat(youtube): import / export of revanced settings (#2077)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
committed by
GitHub
co-authored by
oSumAtrIX
parent
0555cdc54f
commit
5ff3215132
+3
-8
@@ -27,34 +27,30 @@ class HideButtonsPatch : ResourcePatch {
|
||||
override fun execute(context: ResourceContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
PreferenceScreen(
|
||||
"revanced_hide_buttons",
|
||||
StringResource("revanced_hide_buttons_title", "Hide action buttons"),
|
||||
"revanced_hide_buttons_preference_screen",
|
||||
StringResource("revanced_hide_buttons_preference_screen_title", "Hide action buttons"),
|
||||
listOf(
|
||||
SwitchPreference(
|
||||
"revanced_hide_like_dislike_button",
|
||||
StringResource("revanced_hide_like_dislike_button_title", "Hide like and dislike buttons"),
|
||||
false,
|
||||
StringResource("revanced_hide_like_dislike_button_summary_on", "Like and dislike buttons are hidden"),
|
||||
StringResource("revanced_hide_like_dislike_button_summary_off", "Like and dislike buttons are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_download_button",
|
||||
StringResource("revanced_hide_download_button_title", "Hide download button"),
|
||||
false,
|
||||
StringResource("revanced_hide_download_button_summary_on", "Download button is hidden"),
|
||||
StringResource("revanced_hide_download_button_summary_off", "Download button is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_playlist_button",
|
||||
StringResource("revanced_hide_playlist_button_title", "Hide playlist button"),
|
||||
false,
|
||||
StringResource("revanced_hide_playlist_button_summary_on", "Playlist button is hidden"),
|
||||
StringResource("revanced_hide_playlist_button_summary_off", "Playlist button is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_clip_button",
|
||||
StringResource("revanced_hide_clip_button_title", "Hide clip button"),
|
||||
false,
|
||||
StringResource("revanced_hide_clip_button_summary_on", "Clip button is hidden"),
|
||||
StringResource("revanced_hide_clip_button_summary_off", "Clip button is shown"),
|
||||
StringResource("revanced_hide_clip_button_user_dialog_message",
|
||||
@@ -63,12 +59,11 @@ class HideButtonsPatch : ResourcePatch {
|
||||
SwitchPreference(
|
||||
"revanced_hide_action_buttons",
|
||||
StringResource("revanced_hide_action_buttons_title", "Hide all other action buttons"),
|
||||
false,
|
||||
StringResource("revanced_hide_action_buttons_summary_on", "Share, remix, thanks, shop, live chat buttons are hidden"),
|
||||
StringResource("revanced_hide_action_buttons_summary_off", "Share, remix, thanks, shop, live chat buttons are shown")
|
||||
)
|
||||
),
|
||||
StringResource("revanced_hide_buttons_summary", "Hide or show buttons under videos")
|
||||
StringResource("revanced_hide_buttons_preference_screen_summary", "Hide or show buttons under videos")
|
||||
)
|
||||
)
|
||||
return PatchResultSuccess()
|
||||
|
||||
-1
@@ -40,7 +40,6 @@ class HideAutoplayButtonPatch : BytecodePatch(
|
||||
SwitchPreference(
|
||||
"revanced_hide_autoplay_button",
|
||||
StringResource("revanced_hide_autoplay_button_title", "Hide autoplay button"),
|
||||
true,
|
||||
StringResource("revanced_hide_autoplay_button_summary_on", "Autoplay button is hidden"),
|
||||
StringResource("revanced_hide_autoplay_button_summary_off", "Autoplay button is shown")
|
||||
),
|
||||
|
||||
-1
@@ -32,7 +32,6 @@ class HideCaptionsButtonPatch : BytecodePatch(listOf(
|
||||
SwitchPreference(
|
||||
"revanced_hide_captions_button",
|
||||
StringResource("revanced_hide_captions_button_title", "Hide captions button"),
|
||||
false,
|
||||
StringResource("revanced_hide_captions_button_summary_on", "Captions button is hidden"),
|
||||
StringResource("revanced_hide_captions_button_summary_off", "Captions button is shown")
|
||||
)
|
||||
|
||||
-1
@@ -29,7 +29,6 @@ class HideCastButtonPatch : BytecodePatch() {
|
||||
SwitchPreference(
|
||||
"revanced_hide_cast_button",
|
||||
StringResource("revanced_hide_cast_button_title", "Hide cast button"),
|
||||
true,
|
||||
StringResource("revanced_hide_cast_button_summary_on", "Cast button is hidden"),
|
||||
StringResource("revanced_hide_cast_button_summary_off", "Cast button is shown")
|
||||
)
|
||||
|
||||
+2
-7
@@ -41,27 +41,24 @@ class NavigationButtonsPatch : BytecodePatch(listOf(AddCreateButtonViewFingerpri
|
||||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
PreferenceScreen(
|
||||
"revanced_navigation_buttons",
|
||||
StringResource("revanced_navigation_buttons", "Navigation button settings"),
|
||||
"revanced_navigation_buttons_preference_screen",
|
||||
StringResource("revanced_navigation_buttons_preference_screen_title", "Navigation button settings"),
|
||||
listOf(
|
||||
SwitchPreference(
|
||||
"revanced_hide_home_button",
|
||||
StringResource("revanced_hide_home_button_title", "Hide home button"),
|
||||
false,
|
||||
StringResource("revanced_hide_home_button_summary_on", "Home button is hidden"),
|
||||
StringResource("revanced_hide_home_button_summary_off", "Home button is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_shorts_button",
|
||||
StringResource("revanced_hide_shorts_button_title", "Hide shorts button"),
|
||||
true,
|
||||
StringResource("revanced_hide_shorts_button_summary_on", "Shorts button is hidden"),
|
||||
StringResource("revanced_hide_shorts_button_summary_off", "Shorts button is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_hide_subscriptions_button",
|
||||
StringResource("revanced_hide_subscriptions_button_title", "Hide subscriptions button"),
|
||||
false,
|
||||
StringResource(
|
||||
"revanced_hide_subscriptions_button_summary_on",
|
||||
"Home subscriptions is hidden"
|
||||
@@ -71,7 +68,6 @@ class NavigationButtonsPatch : BytecodePatch(listOf(AddCreateButtonViewFingerpri
|
||||
SwitchPreference(
|
||||
"revanced_hide_create_button",
|
||||
StringResource("revanced_hide_create_button_title", "Hide create button"),
|
||||
true,
|
||||
StringResource("revanced_hide_create_button_summary_on", "Create button is hidden"),
|
||||
StringResource("revanced_hide_create_button_summary_off", "Create button is shown")
|
||||
),
|
||||
@@ -81,7 +77,6 @@ class NavigationButtonsPatch : BytecodePatch(listOf(AddCreateButtonViewFingerpri
|
||||
"revanced_switch_create_with_notifications_button_title",
|
||||
"Switch create with notifications button"
|
||||
),
|
||||
true,
|
||||
StringResource(
|
||||
"revanced_switch_create_with_notifications_button_summary_on",
|
||||
"Create button is switched with notifications"
|
||||
|
||||
-1
@@ -41,7 +41,6 @@ class HidePlayerButtonsPatch : BytecodePatch(
|
||||
"revanced_hide_player_buttons_title",
|
||||
"Hide previous & next video buttons"
|
||||
),
|
||||
false,
|
||||
StringResource(
|
||||
"revanced_hide_player_buttons_summary_on",
|
||||
"Buttons are hidden"
|
||||
|
||||
Reference in New Issue
Block a user