Make Snowy.MissingComponent an object instead of a value containing an object

This commit is contained in:
Username404 2021-10-27 10:24:06 +02:00
parent 5cc5303b32
commit f7bc34dbd4
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 2 additions and 1 deletions

View File

@ -14,7 +14,8 @@ abstract class Snowy {
!Modifier.isAbstract(modifiers) && declaredAnnotations.any { it is ButtonInfo && !it.ignored }
private val displayInitMessage: Boolean by Configuration
companion object {
val MissingComponent: TranslatableComponent = object: TranslatableComponent(null) { override fun getString(): String = "MISSING_COMPONENT" }
@Suppress("NULLABILITY_MISMATCH_BASED_ON_JAVA_ANNOTATIONS")
object MissingComponent: TranslatableComponent(null) { override fun getString(): String = "MISSING_COMPONENT" }
@Suppress("JVM_STATIC_ON_CONST_OR_JVM_FIELD") // See KT-39868
@JvmStatic
protected const val FeaturePackage: String = "fr.username404.snowygui.gui.feature"