mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2026-01-28 21:21:02 +00:00
refactor(custom-branding): use getValue operator for options
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
@@ -67,7 +67,7 @@ class CustomBrandingPatch : ResourcePatch() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun getIconStream(iconPath: String): InputStream? {
|
private fun getIconStream(iconPath: String): InputStream? {
|
||||||
val path = Path.of(appIconPath.value ?: return this.javaClass.classLoader.getResourceAsStream(iconPath))
|
val path = Path.of(appIconPath ?: return this.javaClass.classLoader.getResourceAsStream(iconPath))
|
||||||
|
|
||||||
return if (path.exists())
|
return if (path.exists())
|
||||||
path.inputStream()
|
path.inputStream()
|
||||||
@@ -76,7 +76,7 @@ class CustomBrandingPatch : ResourcePatch() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object : OptionsContainer() {
|
companion object : OptionsContainer() {
|
||||||
private var appName = option(
|
private var appName: String? by option(
|
||||||
PatchOption.StringOption(
|
PatchOption.StringOption(
|
||||||
key = "appName",
|
key = "appName",
|
||||||
title = "Application Name",
|
title = "Application Name",
|
||||||
@@ -86,7 +86,7 @@ class CustomBrandingPatch : ResourcePatch() {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
private var appIconPath = option(
|
private var appIconPath: String? by option(
|
||||||
PatchOption.StringOption(
|
PatchOption.StringOption(
|
||||||
key = "appIconPath",
|
key = "appIconPath",
|
||||||
title = "Application Icon Path",
|
title = "Application Icon Path",
|
||||||
|
|||||||
Reference in New Issue
Block a user