mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-04 08:34:27 +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.getElementsByTagName("resources").item(0) as Element).appendChild(
|
||||
document.createElement("attr").apply {
|
||||
setAttribute("format", "reference")
|
||||
setAttribute("format", "reference|color")
|
||||
setAttribute("name", SPLASH_SCREEN_COLOR_NAME)
|
||||
}
|
||||
)
|
||||
@ -49,7 +49,7 @@ val sharedThemePatch = resourcePatch(
|
||||
setAttribute(
|
||||
"name",
|
||||
when (pathIndex) {
|
||||
0 -> "splashScreenColor"
|
||||
0 -> SPLASH_SCREEN_COLOR_NAME
|
||||
1 -> "android:windowSplashScreenBackground"
|
||||
else -> "null"
|
||||
}
|
||||
@ -59,8 +59,10 @@ val sharedThemePatch = resourcePatch(
|
||||
document.createTextNode(
|
||||
when (pathIndex) {
|
||||
0 -> when (nodeAttributeName) {
|
||||
"Base.Theme.YouTube.Launcher.Dark" -> "@color/yt_black1"
|
||||
"Base.Theme.YouTube.Launcher.Light" -> "@color/yt_white1"
|
||||
"Base.Theme.YouTube.Launcher.Dark",
|
||||
"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"
|
||||
}
|
||||
|
||||
|
@ -54,6 +54,7 @@ val themePatch = resourcePatch(
|
||||
values = availableDarkTheme,
|
||||
title = "Dark theme background color",
|
||||
description = "Can be a hex color (#AARRGGBB) or a color resource reference.",
|
||||
required = true,
|
||||
)
|
||||
|
||||
val lightThemeBackgroundColor = stringOption(
|
||||
@ -62,6 +63,7 @@ val themePatch = resourcePatch(
|
||||
values = availableLightTheme,
|
||||
title = "Light theme background color",
|
||||
description = "Can be a hex color (#AARRGGBB) or a color resource reference.",
|
||||
required = true,
|
||||
)
|
||||
|
||||
execute {
|
||||
|
Loading…
x
Reference in New Issue
Block a user