mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
don't report visibility action if divData was changed
f8f70b59d0916b60cb174d099c68eb93a568addd
This commit is contained in:
+4
-1
@@ -256,6 +256,7 @@ internal class DivVisibilityActionTracker @Inject constructor(
|
||||
return@associateTo compositeLogId to action
|
||||
}.let { Collections.synchronizedMap(it) }
|
||||
trackedTokens.add(logIds)
|
||||
val originalDivData = scope.divData
|
||||
/* We use map of CompositeLogId to DivSightAction as token here, so we can cancel
|
||||
* individual actions while still execute the rest of it as a bulk. */
|
||||
handler.postDelayed(delayInMillis = delayMs, token = logIds) {
|
||||
@@ -267,7 +268,9 @@ internal class DivVisibilityActionTracker @Inject constructor(
|
||||
divWithWaitingDisappearActions.remove(view)
|
||||
}
|
||||
}
|
||||
visibilityActionDispatcher.dispatchActions(scope, resolver, view, logIds.values.toTypedArray())
|
||||
if (scope.divData === originalDivData) {
|
||||
visibilityActionDispatcher.dispatchActions(scope, resolver, view, logIds.values.toTypedArray())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user