mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 13:17:46 +02:00
feat(YouTube/Custom branding icon): add old splash animation for Revancify Red
and Revancify Blue
This commit is contained in:
@ -134,7 +134,6 @@ object CustomBrandingIconPatch : BaseResourcePatch(
|
||||
.underBarOrThrow()
|
||||
|
||||
val appIconResourcePath = "youtube/branding/$appIcon"
|
||||
val stockResourcePath = "youtube/branding/stock"
|
||||
|
||||
// Check if a custom path is used in the patch options.
|
||||
if (!availableIcon.containsValue(appIcon)) {
|
||||
@ -176,13 +175,12 @@ object CustomBrandingIconPatch : BaseResourcePatch(
|
||||
if (RestoreOldSplashAnimation == true) {
|
||||
oldSplashAnimationResourceGroups.let { resourceGroups ->
|
||||
resourceGroups.forEach {
|
||||
context.copyResources("$stockResourcePath/splash", it)
|
||||
context.copyResources("$appIconResourcePath/splash", it)
|
||||
}
|
||||
}
|
||||
|
||||
context.copyXmlNode(
|
||||
"$stockResourcePath/splash",
|
||||
"$appIconResourcePath/splash",
|
||||
"values-v31/styles.xml",
|
||||
"resources"
|
||||
)
|
||||
|
@ -145,13 +145,13 @@ fun ResourceContext.copyXmlNode(
|
||||
resourceDirectory: String,
|
||||
targetResource: String,
|
||||
elementTag: String
|
||||
) {
|
||||
val stringsResourceInputStream =
|
||||
inputStreamFromBundledResource(resourceDirectory, targetResource)!!
|
||||
|
||||
) = inputStreamFromBundledResource(
|
||||
resourceDirectory,
|
||||
targetResource
|
||||
)?.let { inputStream ->
|
||||
// Copy nodes from the resources node to the real resource node
|
||||
elementTag.copyXmlNode(
|
||||
this.xmlEditor[stringsResourceInputStream],
|
||||
this.xmlEditor[inputStream],
|
||||
this.xmlEditor["res/$targetResource"]
|
||||
).close()
|
||||
}
|
||||
|
Reference in New Issue
Block a user