From b2bca0167af8b0ab849c8aad331c8d2efcdc5320 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sat, 17 Sep 2022 04:26:29 +0200 Subject: [PATCH] refactor(custom-branding): use `getValue` operator for options Signed-off-by: oSumAtrIX --- .../layout/branding/icon/patch/CustomBrandingPatch.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/branding/icon/patch/CustomBrandingPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/branding/icon/patch/CustomBrandingPatch.kt index 351ae3ae5..89c3e95c6 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/branding/icon/patch/CustomBrandingPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/branding/icon/patch/CustomBrandingPatch.kt @@ -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",