mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-28 21:00:19 +02:00
fix: patch options are not required in the RVX Manager
This commit is contained in:
parent
672034ba24
commit
428c6b18fe
@ -78,7 +78,8 @@ object LayoutComponentsPatch : BaseBytecodePatch(
|
|||||||
key = "ForceHideVoiceSearchButton",
|
key = "ForceHideVoiceSearchButton",
|
||||||
default = false,
|
default = false,
|
||||||
title = "Force hide voice search button",
|
title = "Force hide voice search button",
|
||||||
description = "Permanently hide the voice search button with the legacy method."
|
description = "Permanently hide the voice search button with the legacy method.",
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
|
@ -109,20 +109,23 @@ object CustomBrandingIconPatch : BaseResourcePatch(
|
|||||||
|
|
||||||
${launcherIconResourceFileNames.joinToString("\n") { "- $it" }}
|
${launcherIconResourceFileNames.joinToString("\n") { "- $it" }}
|
||||||
""".trimIndentMultiline(),
|
""".trimIndentMultiline(),
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
private val ChangeHeader by booleanPatchOption(
|
private val ChangeHeader by booleanPatchOption(
|
||||||
key = "ChangeHeader",
|
key = "ChangeHeader",
|
||||||
default = false,
|
default = false,
|
||||||
title = "Change header",
|
title = "Change header",
|
||||||
description = "Apply the custom branding icon to the header."
|
description = "Apply the custom branding icon to the header.",
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
private val ChangeSplashIcon by booleanPatchOption(
|
private val ChangeSplashIcon by booleanPatchOption(
|
||||||
key = "ChangeSplashIcon",
|
key = "ChangeSplashIcon",
|
||||||
default = true,
|
default = true,
|
||||||
title = "Change splash icons",
|
title = "Change splash icons",
|
||||||
description = "Apply the custom branding icon to the splash screen."
|
description = "Apply the custom branding icon to the splash screen.",
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
|
@ -27,6 +27,7 @@ object CustomBrandingNamePatch : BaseResourcePatch(
|
|||||||
),
|
),
|
||||||
title = "App name in notification panel",
|
title = "App name in notification panel",
|
||||||
description = "The name of the app as it appears in the notification panel.",
|
description = "The name of the app as it appears in the notification panel.",
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
private val AppNameLauncher by stringPatchOption(
|
private val AppNameLauncher by stringPatchOption(
|
||||||
@ -40,6 +41,7 @@ object CustomBrandingNamePatch : BaseResourcePatch(
|
|||||||
),
|
),
|
||||||
title = "App name in launcher",
|
title = "App name in launcher",
|
||||||
description = "The name of the app as it appears in the launcher.",
|
description = "The name of the app as it appears in the launcher.",
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
|
@ -29,14 +29,16 @@ object TranslationsPatch : BaseResourcePatch(
|
|||||||
description = """
|
description = """
|
||||||
The path to the 'strings.xml' file.
|
The path to the 'strings.xml' file.
|
||||||
Please note that applying the 'strings.xml' file will overwrite all existing language translations.
|
Please note that applying the 'strings.xml' file will overwrite all existing language translations.
|
||||||
""".trimIndent()
|
""".trimIndent(),
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
private var SelectedTranslations by stringPatchOption(
|
private var SelectedTranslations by stringPatchOption(
|
||||||
key = "SelectedTranslations",
|
key = "SelectedTranslations",
|
||||||
default = TRANSLATIONS.joinToString(", "),
|
default = TRANSLATIONS.joinToString(", "),
|
||||||
title = "Translations to add",
|
title = "Translations to add",
|
||||||
description = "A list of translations to be added for the RVX settings, separated by commas."
|
description = "A list of translations to be added for the RVX settings, separated by commas.",
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
private var SelectedStringResources by stringPatchOption(
|
private var SelectedStringResources by stringPatchOption(
|
||||||
@ -48,7 +50,8 @@ object TranslationsPatch : BaseResourcePatch(
|
|||||||
String resources not in the list will be removed from the app.
|
String resources not in the list will be removed from the app.
|
||||||
|
|
||||||
Default string resource, English, is not removed.
|
Default string resource, English, is not removed.
|
||||||
""".trimIndent()
|
""".trimIndent(),
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
|
@ -25,7 +25,8 @@ object CustomBrandingNamePatch : BaseResourcePatch(
|
|||||||
"Original" to ORIGINAL_APP_NAME,
|
"Original" to ORIGINAL_APP_NAME,
|
||||||
),
|
),
|
||||||
title = "App name",
|
title = "App name",
|
||||||
description = "The name of the app."
|
description = "The name of the app.",
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
|
@ -30,7 +30,8 @@ object ChangePackageNamePatch : BaseResourcePatch(
|
|||||||
"Original" to PACKAGE_NAME_REDDIT,
|
"Original" to PACKAGE_NAME_REDDIT,
|
||||||
),
|
),
|
||||||
title = "Package name of Reddit",
|
title = "Package name of Reddit",
|
||||||
description = "The name of the package to rename the app to."
|
description = "The name of the package to rename the app to.",
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
|
@ -86,7 +86,8 @@ object ToolBarComponentsPatch : BaseBytecodePatch(
|
|||||||
key = "ForceHideVoiceSearchButton",
|
key = "ForceHideVoiceSearchButton",
|
||||||
default = false,
|
default = false,
|
||||||
title = "Force hide voice search button",
|
title = "Force hide voice search button",
|
||||||
description = "Permanently hide the voice search button with the legacy method."
|
description = "Permanently hide the voice search button with the legacy method.",
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
|
@ -27,7 +27,8 @@ object ShortsActionButtonsPatch : BaseResourcePatch(
|
|||||||
DEFAULT_ICON_KEY to "round"
|
DEFAULT_ICON_KEY to "round"
|
||||||
),
|
),
|
||||||
title = "Shorts icon style ",
|
title = "Shorts icon style ",
|
||||||
description = "The style of the icons for the action buttons in the Shorts player."
|
description = "The style of the icons for the action buttons in the Shorts player.",
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
|
@ -125,13 +125,15 @@ object CustomBrandingIconPatch : BaseResourcePatch(
|
|||||||
|
|
||||||
${launcherIconResourceFileNames.joinToString("\n") { "- $it" }}
|
${launcherIconResourceFileNames.joinToString("\n") { "- $it" }}
|
||||||
""".trimIndentMultiline(),
|
""".trimIndentMultiline(),
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
private val ChangeHeader by booleanPatchOption(
|
private val ChangeHeader by booleanPatchOption(
|
||||||
key = "ChangeHeader",
|
key = "ChangeHeader",
|
||||||
default = false,
|
default = false,
|
||||||
title = "Change header",
|
title = "Change header",
|
||||||
description = "Apply the custom branding icon to the header."
|
description = "Apply the custom branding icon to the header.",
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
private val CustomHeader by stringPatchOption(
|
private val CustomHeader by stringPatchOption(
|
||||||
@ -152,20 +154,23 @@ object CustomBrandingIconPatch : BaseResourcePatch(
|
|||||||
The image dimensions must be as follows:
|
The image dimensions must be as follows:
|
||||||
${headerResourceDirectoryNames.map { (dpi, dim) -> "- $dpi: $dim" }.joinToString("\n")}
|
${headerResourceDirectoryNames.map { (dpi, dim) -> "- $dpi: $dim" }.joinToString("\n")}
|
||||||
""".trimIndentMultiline(),
|
""".trimIndentMultiline(),
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
private val ChangeSplashIcon by booleanPatchOption(
|
private val ChangeSplashIcon by booleanPatchOption(
|
||||||
key = "ChangeSplashIcon",
|
key = "ChangeSplashIcon",
|
||||||
default = true,
|
default = true,
|
||||||
title = "Change splash icons",
|
title = "Change splash icons",
|
||||||
description = "Apply the custom branding icon to the splash screen."
|
description = "Apply the custom branding icon to the splash screen.",
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
private val RestoreOldSplashAnimation by booleanPatchOption(
|
private val RestoreOldSplashAnimation by booleanPatchOption(
|
||||||
key = "RestoreOldSplashAnimation",
|
key = "RestoreOldSplashAnimation",
|
||||||
default = false,
|
default = false,
|
||||||
title = "Restore old splash animation",
|
title = "Restore old splash animation",
|
||||||
description = "Restores old style splash animation."
|
description = "Restores old style splash animation.",
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
|
@ -28,7 +28,8 @@ object CustomBrandingNamePatch : BaseResourcePatch(
|
|||||||
"YouTube" to "YouTube",
|
"YouTube" to "YouTube",
|
||||||
),
|
),
|
||||||
title = "App name",
|
title = "App name",
|
||||||
description = "The name of the app."
|
description = "The name of the app.",
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
|
@ -71,6 +71,7 @@ object ThemePatch : BaseResourcePatch(
|
|||||||
),
|
),
|
||||||
title = "Light theme background color",
|
title = "Light theme background color",
|
||||||
description = "Can be a hex color (#AARRGGBB) or a color resource reference.",
|
description = "Can be a hex color (#AARRGGBB) or a color resource reference.",
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
private fun getThemeString(
|
private fun getThemeString(
|
||||||
|
@ -28,14 +28,16 @@ object TranslationsPatch : BaseResourcePatch(
|
|||||||
description = """
|
description = """
|
||||||
The path to the 'strings.xml' file.
|
The path to the 'strings.xml' file.
|
||||||
Please note that applying the 'strings.xml' file will overwrite all existing translations.
|
Please note that applying the 'strings.xml' file will overwrite all existing translations.
|
||||||
""".trimIndent()
|
""".trimIndent(),
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
private var SelectedTranslations by stringPatchOption(
|
private var SelectedTranslations by stringPatchOption(
|
||||||
key = "SelectedTranslations",
|
key = "SelectedTranslations",
|
||||||
default = TRANSLATIONS.joinToString(", "),
|
default = TRANSLATIONS.joinToString(", "),
|
||||||
title = "Translations to add",
|
title = "Translations to add",
|
||||||
description = "A list of translations to be added for the RVX settings, separated by commas."
|
description = "A list of translations to be added for the RVX settings, separated by commas.",
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
private var SelectedStringResources by stringPatchOption(
|
private var SelectedStringResources by stringPatchOption(
|
||||||
@ -47,7 +49,8 @@ object TranslationsPatch : BaseResourcePatch(
|
|||||||
String resources not in the list will be removed from the app.
|
String resources not in the list will be removed from the app.
|
||||||
|
|
||||||
Default string resource, English, is not removed.
|
Default string resource, English, is not removed.
|
||||||
""".trimIndent()
|
""".trimIndent(),
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
|
@ -32,7 +32,8 @@ object VisualPreferencesIconsPatch : BaseResourcePatch(
|
|||||||
"ReVanced Colored" to "revanced_colored",
|
"ReVanced Colored" to "revanced_colored",
|
||||||
),
|
),
|
||||||
title = "RVX settings menu icon",
|
title = "RVX settings menu icon",
|
||||||
description = "Apply different icons for RVX settings menu."
|
description = "Apply different icons for RVX settings menu.",
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
override fun execute(context: ResourceContext) {
|
override fun execute(context: ResourceContext) {
|
||||||
|
@ -52,7 +52,8 @@ object OverlayButtonsPatch : BaseResourcePatch(
|
|||||||
default = DEFAULT_ICON_KEY,
|
default = DEFAULT_ICON_KEY,
|
||||||
values = iconTypes,
|
values = iconTypes,
|
||||||
title = "Icon type",
|
title = "Icon type",
|
||||||
description = "The icon type."
|
description = "The icon type.",
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
// Option to set bottom margin
|
// Option to set bottom margin
|
||||||
@ -64,7 +65,8 @@ object OverlayButtonsPatch : BaseResourcePatch(
|
|||||||
"Default" to DEFAULT_MARGIN
|
"Default" to DEFAULT_MARGIN
|
||||||
),
|
),
|
||||||
title = "Bottom margin",
|
title = "Bottom margin",
|
||||||
description = "The bottom margin for the overlay buttons and timestamp."
|
description = "The bottom margin for the overlay buttons and timestamp.",
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -71,14 +71,16 @@ object SettingsPatch : BaseResourcePatch(
|
|||||||
default = DEFAULT_ELEMENT,
|
default = DEFAULT_ELEMENT,
|
||||||
values = SETTINGS_ELEMENTS_MAP,
|
values = SETTINGS_ELEMENTS_MAP,
|
||||||
title = "Insert position",
|
title = "Insert position",
|
||||||
description = "The settings menu name that the RVX settings menu should be above."
|
description = "The settings menu name that the RVX settings menu should be above.",
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
private val RVXSettingsMenuName by stringPatchOption(
|
private val RVXSettingsMenuName by stringPatchOption(
|
||||||
key = "RVXSettingsMenuName",
|
key = "RVXSettingsMenuName",
|
||||||
default = DEFAULT_NAME,
|
default = DEFAULT_NAME,
|
||||||
title = "RVX settings menu name",
|
title = "RVX settings menu name",
|
||||||
description = "The name of the RVX settings menu."
|
description = "The name of the RVX settings menu.",
|
||||||
|
required = true
|
||||||
)
|
)
|
||||||
|
|
||||||
internal lateinit var contexts: ResourceContext
|
internal lateinit var contexts: ResourceContext
|
||||||
|
Loading…
x
Reference in New Issue
Block a user