mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2024-11-10 09:07:46 +01:00
refactor: migrate CustomBrandingPatch.kt to DependsOn
This commit is contained in:
parent
de61c38a23
commit
6d73591d59
1 changed files with 4 additions and 3 deletions
|
@ -7,7 +7,7 @@ import app.revanced.patcher.data.impl.ResourceData
|
|||
import app.revanced.patcher.patch.PatchResult
|
||||
import app.revanced.patcher.patch.PatchResultError
|
||||
import app.revanced.patcher.patch.PatchResultSuccess
|
||||
import app.revanced.patcher.patch.annotations.Dependencies
|
||||
import app.revanced.patcher.patch.annotations.DependsOn
|
||||
import app.revanced.patcher.patch.annotations.Patch
|
||||
import app.revanced.patcher.patch.impl.ResourcePatch
|
||||
import app.revanced.patches.youtube.layout.branding.icon.annotations.CustomBrandingCompatibility
|
||||
|
@ -15,7 +15,7 @@ import app.revanced.patches.youtube.misc.manifest.patch.FixLocaleConfigErrorPatc
|
|||
import java.nio.file.Files
|
||||
|
||||
@Patch
|
||||
@Dependencies([FixLocaleConfigErrorPatch::class])
|
||||
@DependsOn(FixLocaleConfigErrorPatch::class)
|
||||
@Name("custom-branding")
|
||||
@Description("Changes the YouTube launcher icon to be ReVanced's.")
|
||||
@CustomBrandingCompatibility
|
||||
|
@ -44,7 +44,8 @@ class CustomBrandingPatch : ResourcePatch() {
|
|||
?: return PatchResultError("The icon $iconName can not be found.")
|
||||
|
||||
Files.write(
|
||||
resDirectory.resolve("mipmap-$iconDirectory").resolve("$iconName.png").toPath(), iconFile.readAllBytes()
|
||||
resDirectory.resolve("mipmap-$iconDirectory").resolve("$iconName.png").toPath(),
|
||||
iconFile.readAllBytes()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue