mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-09 11:04:36 +02:00
fix(Custom branding icon): displays an appropriate error if the path to patch options is invalid
This commit is contained in:
parent
9b15d234e3
commit
b81392a2d4
@ -68,6 +68,7 @@ object CustomBrandingIconPatch : ResourcePatch() {
|
||||
directory, *mipmapIconResourceFileNames
|
||||
)
|
||||
}.let { resourceGroups ->
|
||||
try {
|
||||
val path = File(appIcon)
|
||||
val resourceDirectory = context["res"]
|
||||
|
||||
@ -82,6 +83,9 @@ object CustomBrandingIconPatch : ResourcePatch() {
|
||||
)
|
||||
}
|
||||
}
|
||||
} catch (_: Exception) {
|
||||
throw PatchException("Invalid app icon path: $appIcon")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
val resourcePath = "music/branding/$appIconValue"
|
||||
|
@ -113,6 +113,7 @@ object CustomBrandingIconPatch : ResourcePatch() {
|
||||
directory, *mipmapIconResourceFileNames
|
||||
)
|
||||
}.let { resourceGroups ->
|
||||
try {
|
||||
val path = File(appIcon)
|
||||
val resourceDirectory = context["res"]
|
||||
|
||||
@ -128,6 +129,9 @@ object CustomBrandingIconPatch : ResourcePatch() {
|
||||
}
|
||||
}
|
||||
context.updatePatchStatusIcon("custom")
|
||||
} catch (_: Exception) {
|
||||
throw PatchException("Invalid app icon path: $appIcon")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
val resourcePath = "youtube/branding/$appIconValue"
|
||||
|
Loading…
x
Reference in New Issue
Block a user