mirror of
https://github.com/divkit/divkit.git
synced 2026-05-07 20:02:32 +00:00
DivView clean up
commit_hash:cf40e7889164a2baee89c6dc5fee661e4d1cfc44
This commit is contained in:
+1
-1
@@ -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 {
|
||||
|
||||
+2
-6
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user