commonMain.ru.casperix.multiplatform.loader.LoaderInfo.kt Maven / Gradle / Ivy
The newest version!
package ru.casperix.multiplatform.loader
import ru.casperix.signals.concrete.EitherFuture
class LoaderInfo(val file: String, val signal: EitherFuture) {
var content: Content? = null ; private set
var error:Error? = null; private set
var isLoading = true; private set
init {
signal.then({
isLoading = false
content = it
}, {
isLoading = false
error = it
})
}
}