mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2024-11-10 01:01:56 +01:00
fix: inconsistencies in preference switches (#1207)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
parent
514b5da9a7
commit
b6ea5a43b3
19 changed files with 95 additions and 93 deletions
|
@ -37,8 +37,8 @@ class DownloadsResourcePatch : ResourcePatch {
|
|||
"revanced_downloads",
|
||||
StringResource("revanced_downloads_enabled_title", "Show download button"),
|
||||
true,
|
||||
StringResource("revanced_downloads_enabled_summary_on", "Download button is visible"),
|
||||
StringResource("revanced_downloads_enabled_summary_off", "Download button is hidden")
|
||||
StringResource("revanced_downloads_enabled_summary_on", "Download button is shown"),
|
||||
StringResource("revanced_downloads_enabled_summary_off", "Download button is not shown")
|
||||
),
|
||||
TextPreference(
|
||||
"revanced_downloads_package_name",
|
||||
|
|
|
@ -38,11 +38,11 @@ class HideAutoplayButtonPatch : BytecodePatch(
|
|||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_autoplay_button_enabled",
|
||||
StringResource("revanced_autoplay_button_enabled_title", "Show autoplay button"),
|
||||
false,
|
||||
StringResource("revanced_autoplay_button_summary_on", "Autoplay button is shown"),
|
||||
StringResource("revanced_autoplay_button_summary_off", "Autoplay button is hidden")
|
||||
"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")
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -31,46 +31,46 @@ class HideButtonsPatch : ResourcePatch {
|
|||
StringResource("revanced_hide_buttons_title", "Hide action buttons"),
|
||||
listOf(
|
||||
SwitchPreference(
|
||||
"revanced_like_button",
|
||||
StringResource("revanced_like_button_title", "Hide like button"),
|
||||
"revanced_hide_like_button",
|
||||
StringResource("revanced_hide_like_button_title", "Hide like button"),
|
||||
false,
|
||||
StringResource("revanced_like_button_on", "Like button is hidden"),
|
||||
StringResource("revanced_like_button_off", "Like button is shown")
|
||||
StringResource("revanced_hide_like_button_summary_on", "Like button is hidden"),
|
||||
StringResource("revanced_hide_like_button_summary_off", "Like button is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_dislike_button",
|
||||
StringResource("revanced_dislike_button_title", "Hide dislike button"),
|
||||
"revanced_hide_dislike_button",
|
||||
StringResource("revanced_hide_dislike_button_title", "Hide dislike button"),
|
||||
false,
|
||||
StringResource("revanced_dislike_button_on", "Dislike button is hidden"),
|
||||
StringResource("revanced_dislike_button_off", "Dislike button is shown")
|
||||
StringResource("revanced_hide_dislike_button_summary_on", "Dislike button is hidden"),
|
||||
StringResource("revanced_hide_dislike_button_summary_off", "Dislike button is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_download_button",
|
||||
StringResource("revanced_download_button_title", "Hide download button"),
|
||||
"revanced_hide_download_button",
|
||||
StringResource("revanced_hide_download_button_title", "Hide download button"),
|
||||
false,
|
||||
StringResource("revanced_download_button_on", "Download button is hidden"),
|
||||
StringResource("revanced_download_button_off", "Download button is shown")
|
||||
StringResource("revanced_hide_download_button_summary_on", "Download button is hidden"),
|
||||
StringResource("revanced_hide_download_button_summary_off", "Download button is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_playlist_button",
|
||||
StringResource("revanced_playlist_button_title", "Hide playlist button"),
|
||||
"revanced_hide_playlist_button",
|
||||
StringResource("revanced_hide_playlist_button_title", "Hide playlist button"),
|
||||
false,
|
||||
StringResource("revanced_playlist_button_on", "Playlist button is hidden"),
|
||||
StringResource("revanced_playlist_button_off", "Playlist button is shown")
|
||||
StringResource("revanced_hide_playlist_button_summary_on", "Playlist button is hidden"),
|
||||
StringResource("revanced_hide_playlist_button_summary_off", "Playlist button is shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_action_button",
|
||||
StringResource("revanced_action_button_title", "Hide create, clip and thanks buttons"),
|
||||
"revanced_hide_action_button",
|
||||
StringResource("revanced_hide_action_button_title", "Hide create, clip and thanks buttons"),
|
||||
true,
|
||||
StringResource("revanced_action_button_on", "Buttons are hidden"),
|
||||
StringResource("revanced_action_button_off", "Buttons are shown")
|
||||
StringResource("revanced_hide_action_button_summary_on", "Buttons are hidden"),
|
||||
StringResource("revanced_hide_action_button_summary_off", "Buttons are shown")
|
||||
),
|
||||
SwitchPreference(
|
||||
"revanced_share_button",
|
||||
StringResource("revanced_share_button_title", "Hide share button"),
|
||||
"revanced_hide_share_button",
|
||||
StringResource("revanced_hide_share_button_title", "Hide share button"),
|
||||
false,
|
||||
StringResource("revanced_share_button_on", "Share button is hidden"),
|
||||
StringResource("revanced_share_button_off", "Share button is shown")
|
||||
StringResource("revanced_hide_share_button_summary_on", "Share button is hidden"),
|
||||
StringResource("revanced_hide_share_button_summaryoff", "Share button is shown")
|
||||
),
|
||||
),
|
||||
StringResource("revanced_hide_buttons_summary", "Hide or show buttons under videos")
|
||||
|
|
|
@ -27,11 +27,11 @@ class HideCastButtonPatch : BytecodePatch() {
|
|||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_cast_button_enabled",
|
||||
StringResource("revanced_cast_button_enabled_title", "Show cast button"),
|
||||
false,
|
||||
StringResource("revanced_cast_button_summary_on", "Cast button is shown"),
|
||||
StringResource("revanced_cast_button_summary_off", "Cast button is hidden")
|
||||
"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")
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ class CommentsResourcePatch : ResourcePatch {
|
|||
listOf(
|
||||
SwitchPreference(
|
||||
"revanced_hide_comments_section",
|
||||
StringResource("revanced_hide_comments_section_title", "Remove comments section"),
|
||||
StringResource("revanced_hide_comments_section_title", "Hide comments section"),
|
||||
false,
|
||||
StringResource("revanced_hide_comments_section_summary_on", "Comment section is hidden"),
|
||||
StringResource("revanced_hide_comments_section_summary_off", "Comment section is shown")
|
||||
|
|
|
@ -35,11 +35,11 @@ class FullscreenPanelsRemoverPatch : BytecodePatch(
|
|||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_fullscreen_panels_enabled",
|
||||
StringResource("revanced_fullscreen_panels_enabled_title", "Show fullscreen panels"),
|
||||
false,
|
||||
StringResource("revanced_fullscreen_panels_summary_on", "Fullscreen panels are shown"),
|
||||
StringResource("revanced_fullscreen_panels_summary_off", "Fullscreen panels are hidden")
|
||||
"revanced_hide_fullscreen_panels",
|
||||
StringResource("revanced_hide_fullscreen_panels_title", "Hide fullscreen panels"),
|
||||
true,
|
||||
StringResource("revanced_hide_fullscreen_panels_summary_on", "Fullscreen panels are hidden"),
|
||||
StringResource("revanced_hide_fullscreen_panels_summary_off", "Fullscreen panels are shown")
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -26,10 +26,10 @@ class AlbumCardsResourcePatch : ResourcePatch {
|
|||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_hide_album_cards",
|
||||
StringResource("revanced_hide_album_cards_title", "Hide the album cards"),
|
||||
StringResource("revanced_hide_album_cards_title", "Hide album cards"),
|
||||
false,
|
||||
StringResource("revanced_hide_album_cards_summary_on", "Album cards is hidden"),
|
||||
StringResource("revanced_hide_album_cards_summary_off", "Album cards is visible")
|
||||
StringResource("revanced_hide_album_cards_summary_on", "Music album cards are hidden"),
|
||||
StringResource("revanced_hide_album_cards_summary_off", "Music album cards are shown")
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -26,10 +26,10 @@ class CrowdfundingBoxResourcePatch : ResourcePatch {
|
|||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_hide_crowdfunding_box",
|
||||
StringResource("revanced_hide_crowdfunding_box_title", "Hide the crowdfunding box"),
|
||||
StringResource("revanced_hide_crowdfunding_box_title", "Hide crowdfunding box"),
|
||||
false,
|
||||
StringResource("revanced_hide_crowdfunding_box_summary_on", "Crowdfunding box is hidden"),
|
||||
StringResource("revanced_hide_crowdfunding_box_summary_off", "Crowdfunding box is visible")
|
||||
StringResource("revanced_hide_crowdfunding_box_summary_off", "Crowdfunding box is shown")
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -35,11 +35,11 @@ class MixPlaylistsPatch : BytecodePatch(
|
|||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_mix_playlists_hidden",
|
||||
StringResource("revanced_mix_playlists_title", "Hide mix playlists"),
|
||||
"revanced_hide_mix_playlists",
|
||||
StringResource("revanced_hide_mix_playlists_title", "Hide mix playlists"),
|
||||
false,
|
||||
StringResource("revanced_mix_playlists_summary_on", "Mix playlists are hidden"),
|
||||
StringResource("revanced_mix_playlists_summary_off", "Mix playlists are shown")
|
||||
StringResource("revanced_hide_mix_playlists_summary_on", "Mix playlists are hidden"),
|
||||
StringResource("revanced_hide_mix_playlists_summary_off", "Mix playlists are shown")
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class HideTimeAndSeekbarPatch : BytecodePatch(
|
|||
StringResource("revanced_hide_time_and_seekbar_title", "Hide time and seekbar"),
|
||||
false,
|
||||
StringResource("revanced_hide_time_and_seekbar_summary_on", "Time and seekbar are hidden"),
|
||||
StringResource("revanced_hide_time_and_seekbar_summary_off", "Time and seekbar are visible")
|
||||
StringResource("revanced_hide_time_and_seekbar_summary_off", "Time and seekbar are shown")
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -21,9 +21,11 @@ import org.jf.dexlib2.iface.instruction.FiveRegisterInstruction
|
|||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||
@Name("old-quality-layout")
|
||||
@Description("Enables the original quality flyout menu.")
|
||||
@Description("Enables the original video quality flyout in the video player settings")
|
||||
@OldQualityLayoutCompatibility
|
||||
@Version("0.0.1")
|
||||
// new ReVanced users have no idea what it means to use the "old quality layout menu"
|
||||
// maybe rename this patch to better describe what it provides (ie: user-selectable-video-resolution )
|
||||
class OldQualityLayoutPatch : BytecodePatch(
|
||||
listOf(QualityMenuViewInflateFingerprint)
|
||||
) {
|
||||
|
@ -31,10 +33,10 @@ class OldQualityLayoutPatch : BytecodePatch(
|
|||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_use_old_style_quality_settings",
|
||||
StringResource("revanced_old_style_quality_settings_enabled_title", "Use old quality layout"),
|
||||
StringResource("revanced_old_style_quality_settings_enabled_title", "Use old video quality player menu"),
|
||||
true,
|
||||
StringResource("revanced_old_style_quality_settings_summary_on", "Old quality settings are shown"),
|
||||
StringResource("revanced_old_style_quality_settings_summary_off", "New quality settings are shown")
|
||||
StringResource("revanced_old_style_quality_settings_summary_on", "Old video quality menu is used"),
|
||||
StringResource("revanced_old_style_quality_settings_summary_off", "Old video quality menu is not used")
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -26,10 +26,10 @@ class HideEmailAddressResourcePatch : ResourcePatch {
|
|||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_hide_email_address",
|
||||
StringResource("revanced_hide_email_address_title", "Hide the email address"),
|
||||
StringResource("revanced_hide_email_address_title", "Hide email in account switcher"),
|
||||
false,
|
||||
StringResource("revanced_hide_email_address_summary_on", "Email address is hidden"),
|
||||
StringResource("revanced_hide_email_address_summary_off", "Email address is visible")
|
||||
StringResource("revanced_hide_email_address_summary_off", "Email address is shown")
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -37,11 +37,11 @@ class CreateButtonRemoverPatch : BytecodePatch() {
|
|||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_create_button_enabled",
|
||||
StringResource("revanced_create_button_enabled_title", "Show create button"),
|
||||
false,
|
||||
StringResource("revanced_create_button_summary_on", "Create button is shown"),
|
||||
StringResource("revanced_create_button_summary_off", "Create button is hidden")
|
||||
"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")
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -37,11 +37,11 @@ class ShortsButtonRemoverPatch : BytecodePatch() {
|
|||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_shorts_button_enabled",
|
||||
StringResource("revanced_shorts_button_enabled_title", "Show shorts button"),
|
||||
false,
|
||||
StringResource("revanced_shorts_button_summary_on", "Shorts button is shown"),
|
||||
StringResource("revanced_shorts_button_summary_off", "Shorts button is hidden")
|
||||
"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")
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -29,11 +29,11 @@ class HideReelsPatch : BytecodePatch(
|
|||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_reel_button_enabled",
|
||||
StringResource("revanced_reel_button_enabled_title", "Show reels button"),
|
||||
false,
|
||||
StringResource("revanced_reel_button_summary_on", "Reels button is shown"),
|
||||
StringResource("revanced_reel_button_summary_off", "Reels button is hidden")
|
||||
"revanced_hide_reel_button",
|
||||
StringResource("revanced_hide_reel_button_title", "Hide reels button"),
|
||||
true,
|
||||
StringResource("revanced_hide_reel_button_summary_on", "Reels button is hidden"),
|
||||
StringResource("revanced_hide_reel_button_summary_off", "Reels button is shown")
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import app.revanced.patches.shared.settings.preference.impl.SwitchPreference
|
|||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||
@Name("hide-watch-in-vr")
|
||||
@Description("Hides the Watch in VR option from the player settings flyout panel.")
|
||||
@Description("Hides the Watch in VR option in the player settings flyout panel.")
|
||||
@WatchinVRCompatibility
|
||||
@Version("0.0.1")
|
||||
class WatchinVRPatch : BytecodePatch(
|
||||
|
@ -32,10 +32,10 @@ class WatchinVRPatch : BytecodePatch(
|
|||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_hide_watch_in_vr",
|
||||
StringResource("revanced_hide_watch_in_vr_title", "Hide Watch in VR option"),
|
||||
StringResource("revanced_hide_watch_in_vr_title", "Hide watch in VR"),
|
||||
false,
|
||||
StringResource("revanced_hide_watch_in_vr_summary_on", "Watch in VR option is hidden"),
|
||||
StringResource("revanced_hide_watch_in_vr_summary_off", "Watch in VR option is shown")
|
||||
StringResource("revanced_hide_watch_in_vr_summary_on", "Watch in VR player setting is hidden"),
|
||||
StringResource("revanced_hide_watch_in_vr_summary_off", "Watch in VR player setting is shown")
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -35,11 +35,11 @@ class HideWatermarkPatch : BytecodePatch(
|
|||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.LAYOUT.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_branding_watermark_enabled",
|
||||
StringResource("revanced_branding_watermark_enabled_title", "Show branding watermark"),
|
||||
false,
|
||||
StringResource("revanced_branding_watermark_summary_on", "Branding watermark is shown"),
|
||||
StringResource("revanced_branding_watermark_summary_off", "Branding watermark is hidden")
|
||||
"revanced_hide_video_watermark",
|
||||
StringResource("revanced_hide_video_watermark_title", "Hide creator watermark on videos"),
|
||||
true,
|
||||
StringResource("revanced_hide_video_watermark_summary_on", "Watermark is hidden"),
|
||||
StringResource("revanced_hide_video_watermark_summary_off", "Watermark is shown")
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.jf.dexlib2.iface.instruction.formats.Instruction35c
|
|||
@Patch
|
||||
@DependsOn([IntegrationsPatch::class, SettingsPatch::class])
|
||||
@Name("open-links-directly")
|
||||
@Description("Bypasses redirect links and allows opening links directly.")
|
||||
@Description("Bypasses URL redirects and opens links directly inside YouTube app.")
|
||||
@OpenLinksDirectlyCompatibility
|
||||
@Version("0.0.1")
|
||||
class OpenLinksDirectlyPatch : BytecodePatch(
|
||||
|
@ -37,10 +37,10 @@ class OpenLinksDirectlyPatch : BytecodePatch(
|
|||
SettingsPatch.PreferenceScreen.MISC.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_uri_redirect",
|
||||
StringResource("revanced_uri_redirect_title", "Open links directly"),
|
||||
StringResource("revanced_uri_redirect_title", "Open YouTube links inside app"),
|
||||
true,
|
||||
StringResource("revanced_uri_redirect_summary_on", "Enabled"),
|
||||
StringResource("revanced_uri_redirect_summary_off", "Disabled")
|
||||
StringResource("revanced_uri_redirect_summary_on", "Links opened inside YouTube ReVanced"),
|
||||
StringResource("revanced_uri_redirect_summary_off", "Links opened in web browser")
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -38,16 +38,16 @@ class RememberVideoQualityPatch : BytecodePatch(
|
|||
override fun execute(context: BytecodeContext): PatchResult {
|
||||
SettingsPatch.PreferenceScreen.MISC.addPreferences(
|
||||
SwitchPreference(
|
||||
"revanced_remember_video_quality_selection",
|
||||
StringResource("revanced_remember_video_quality_selection_title", "Remember current video quality"),
|
||||
false,
|
||||
"revanced_remember_video_quality_last_selected",
|
||||
StringResource("revanced_remember_video_quality_last_selected_title", "Remember video quality changes"),
|
||||
true,
|
||||
StringResource(
|
||||
"revanced_remember_video_quality_selection_summary_on",
|
||||
"The current video quality will not change"
|
||||
"revanced_remember_video_quality_last_selected_summary_on",
|
||||
"Quality changes apply to all videos"
|
||||
),
|
||||
StringResource(
|
||||
"revanced_remember_video_quality_selection_summary_off",
|
||||
"Video quality will be remembered until a new quality is chosen"
|
||||
"revanced_remember_video_quality_last_selected_summary_off",
|
||||
"Quality changes only apply to the current video and are reverted back to the last remembered quality for future playbacks"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue