mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-04 16:44:29 +02:00
fix(YouTube - Theme): Splash screen color attribute not specified in YouTube 19.44.39
This commit is contained in:
parent
0d0c108d85
commit
2f7b753551
@ -27,7 +27,7 @@ val sharedThemePatch = resourcePatch(
|
|||||||
document(attrsResourceFile).use { document ->
|
document(attrsResourceFile).use { document ->
|
||||||
(document.getElementsByTagName("resources").item(0) as Element).appendChild(
|
(document.getElementsByTagName("resources").item(0) as Element).appendChild(
|
||||||
document.createElement("attr").apply {
|
document.createElement("attr").apply {
|
||||||
setAttribute("format", "reference")
|
setAttribute("format", "reference|color")
|
||||||
setAttribute("name", SPLASH_SCREEN_COLOR_NAME)
|
setAttribute("name", SPLASH_SCREEN_COLOR_NAME)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@ -49,7 +49,7 @@ val sharedThemePatch = resourcePatch(
|
|||||||
setAttribute(
|
setAttribute(
|
||||||
"name",
|
"name",
|
||||||
when (pathIndex) {
|
when (pathIndex) {
|
||||||
0 -> "splashScreenColor"
|
0 -> SPLASH_SCREEN_COLOR_NAME
|
||||||
1 -> "android:windowSplashScreenBackground"
|
1 -> "android:windowSplashScreenBackground"
|
||||||
else -> "null"
|
else -> "null"
|
||||||
}
|
}
|
||||||
@ -59,8 +59,10 @@ val sharedThemePatch = resourcePatch(
|
|||||||
document.createTextNode(
|
document.createTextNode(
|
||||||
when (pathIndex) {
|
when (pathIndex) {
|
||||||
0 -> when (nodeAttributeName) {
|
0 -> when (nodeAttributeName) {
|
||||||
"Base.Theme.YouTube.Launcher.Dark" -> "@color/yt_black1"
|
"Base.Theme.YouTube.Launcher.Dark",
|
||||||
"Base.Theme.YouTube.Launcher.Light" -> "@color/yt_white1"
|
"Base.Theme.YouTube.Launcher.Cairo.Dark" -> "@color/yt_black1"
|
||||||
|
"Base.Theme.YouTube.Launcher.Light",
|
||||||
|
"Base.Theme.YouTube.Launcher.Cairo.Light" -> "@color/yt_white1"
|
||||||
else -> "null"
|
else -> "null"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,6 +54,7 @@ val themePatch = resourcePatch(
|
|||||||
values = availableDarkTheme,
|
values = availableDarkTheme,
|
||||||
title = "Dark theme background color",
|
title = "Dark 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,
|
||||||
)
|
)
|
||||||
|
|
||||||
val lightThemeBackgroundColor = stringOption(
|
val lightThemeBackgroundColor = stringOption(
|
||||||
@ -62,6 +63,7 @@ val themePatch = resourcePatch(
|
|||||||
values = availableLightTheme,
|
values = availableLightTheme,
|
||||||
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,
|
||||||
)
|
)
|
||||||
|
|
||||||
execute {
|
execute {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user