fix(YouTube - Custom branding): Set default values for patch options

This commit is contained in:
oSumAtrIX 2023-10-25 22:54:16 +02:00
parent 5b83a9da3d
commit 2ba31f1301
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4

View file

@ -21,6 +21,7 @@ import java.nio.file.Files
@Suppress("unused") @Suppress("unused")
object CustomBrandingPatch : ResourcePatch() { object CustomBrandingPatch : ResourcePatch() {
private const val REVANCED_ICON = "ReVanced*Logo" // Can never be a valid path. private const val REVANCED_ICON = "ReVanced*Logo" // Can never be a valid path.
private const val APP_NAME = "YouTube ReVanced"
private val iconResourceFileNames = arrayOf( private val iconResourceFileNames = arrayOf(
"adaptiveproduct_youtube_background_color_108", "adaptiveproduct_youtube_background_color_108",
@ -39,8 +40,9 @@ object CustomBrandingPatch : ResourcePatch() {
private var appName by stringPatchOption( private var appName by stringPatchOption(
key = "appName", key = "appName",
default = APP_NAME,
values = mapOf( values = mapOf(
"YouTube ReVanced" to "YouTube ReVanced", "YouTube ReVanced" to APP_NAME,
"YT" to "YT", "YT" to "YT",
"YouTube" to "YouTube", "YouTube" to "YouTube",
), ),
@ -50,6 +52,7 @@ object CustomBrandingPatch : ResourcePatch() {
private var icon by stringPatchOption( private var icon by stringPatchOption(
key = "iconPath", key = "iconPath",
default = REVANCED_ICON,
values = mapOf("ReVanced Logo" to REVANCED_ICON), values = mapOf("ReVanced Logo" to REVANCED_ICON),
title = "App icon", title = "App icon",
description = """ description = """