refactor(custom-branding): use getValue operator for options

Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
oSumAtrIX
2022-09-17 04:26:29 +02:00
parent 2f1fef0449
commit b2bca0167a

View File

@@ -67,7 +67,7 @@ class CustomBrandingPatch : ResourcePatch() {
}
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())
path.inputStream()
@@ -76,7 +76,7 @@ class CustomBrandingPatch : ResourcePatch() {
}
companion object : OptionsContainer() {
private var appName = option(
private var appName: String? by option(
PatchOption.StringOption(
key = "appName",
title = "Application Name",
@@ -86,7 +86,7 @@ class CustomBrandingPatch : ResourcePatch() {
)
)
private var appIconPath = option(
private var appIconPath: String? by option(
PatchOption.StringOption(
key = "appIconPath",
title = "Application Icon Path",