Simplify ProgressStateModel

This commit is contained in:
Julian Raufelder 2021-09-17 10:47:22 +02:00
parent 6d7d8718f4
commit e93c14de03
No known key found for this signature in database
GPG Key ID: 17EE71F6634E381D

View File

@ -5,9 +5,9 @@ import java.io.Serializable
open class ProgressStateModel private constructor(private val name: String, image: Image, text: Text, selectable: Boolean) : Serializable {
private val imageResourceId: Int
private val textResourceId: Int
val isSelectable: Boolean
private val imageResourceId: Int = image.id()
private val textResourceId: Int = text.id()
val isSelectable: Boolean = selectable
private constructor(name: String) : this(name, noImage(), noText())
private constructor(name: String, text: Text) : this(name, noImage(), text)
@ -76,9 +76,4 @@ open class ProgressStateModel private constructor(private val name: String, imag
}
}
init {
imageResourceId = image.id()
textResourceId = text.id()
isSelectable = selectable
}
}