I’ve the below observable working fine, but I need to reset the initial value to -1 after each time it is triggered.
I noticed both oldValue
and newValue
are immutable?
var detectedFaces: Int by Delegates.observable(-1) { property, oldValue, newValue ->
println("Detected Faces are: $detectedFaces")
}