DivView clean up

commit_hash:cf40e7889164a2baee89c6dc5fee661e4d1cfc44
This commit is contained in:
pkurchatov
2026-03-11 12:03:34 +03:00
parent 5a258fa1e3
commit 7ddee82b82
3 changed files with 4 additions and 8 deletions
@@ -156,7 +156,7 @@ private class TriggerExecutor(
private fun tryTriggerActions() {
attachedViews.forEach { divView ->
(divView as? Div2View)?.runBindingAction {
divView.runBindingAction {
tryTriggerActions(divView)
}
}
@@ -36,7 +36,7 @@ internal inline fun Div2View.runBindingAction(crossinline action: () -> Unit) {
}
}
internal inline fun Div2View.postBindingAction(crossinline action: () -> Unit) {
private inline fun Div2View.postBindingAction(crossinline action: () -> Unit) {
val criticalSection = viewComponent.bindingCriticalSection
val handle = criticalSection.enter()
UiThreadHandler.postOnMainThread {
@@ -41,18 +41,14 @@ class DivViewAdapter(
}
if (startAnimationCount >= 0) {
startAnimationCount--
(holder.view as? Div2View)?.startDivAnimation()
holder.view.startDivAnimation()
}
if (stopAnimationCount >= 0) {
stopAnimationCount--
(holder.view as? Div2View)?.stopDivAnimation()
holder.view.stopDivAnimation()
}
}
override fun onViewRecycled(holder: DivViewHolder) {
super.onViewRecycled(holder)
}
override fun getItemCount() = items.size
fun addFromJson(json: JSONObject) {