Skip to content

Commit

Permalink
Rename loading binding
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcinMoskala committed May 5, 2017
1 parent a809280 commit dab74c1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ private class LoadingBinding(
) : ReadWriteProperty<Any?, Boolean> {

val progressView by progressLazyViewProvider
val visibleAtStartView by restViewHolderLazyProvider
val restOfView by restViewHolderLazyProvider

override fun getValue(thisRef: Any?, property: KProperty<*>): Boolean {
return progressView.visibility == View.VISIBLE
}

override fun setValue(thisRef: Any?, property: KProperty<*>, value: Boolean) {
progressView.visibility = if(value) View.VISIBLE else View.GONE
visibleAtStartView?.visibility = if(!value) View.GONE else View.VISIBLE
restOfView?.visibility = if(!value) View.GONE else View.VISIBLE
}
}

0 comments on commit dab74c1

Please sign in to comment.