fix(YouTube - Theme): only set splash screen color if background colors are set
This commit is contained in:
parent
a808eca796
commit
f058db4ba4
|
@ -66,7 +66,9 @@ class ThemeResourcePatch : ResourcePatch {
|
||||||
addColorResource(context, "res/values-night/colors.xml", SPLASH_BACKGROUND_COLOR, it)
|
addColorResource(context, "res/values-night/colors.xml", SPLASH_BACKGROUND_COLOR, it)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Edit splash screen files and change the background color.
|
// Edit splash screen files and change the background color,
|
||||||
|
// if the background colors are set.
|
||||||
|
if (darkThemeBackgroundColor != null && lightThemeBackgroundColor != null) {
|
||||||
val splashScreenResourceFiles = listOf(
|
val splashScreenResourceFiles = listOf(
|
||||||
"res/drawable/quantum_launchscreen_youtube.xml",
|
"res/drawable/quantum_launchscreen_youtube.xml",
|
||||||
"res/drawable-sw600dp/quantum_launchscreen_youtube.xml")
|
"res/drawable-sw600dp/quantum_launchscreen_youtube.xml")
|
||||||
|
@ -86,6 +88,8 @@ class ThemeResourcePatch : ResourcePatch {
|
||||||
return PatchResultError("Failed to modify launch screen")
|
return PatchResultError("Failed to modify launch screen")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return PatchResultSuccess()
|
return PatchResultSuccess()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue