mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
Moved observeTintColor into bind method.
Changing tint color stopped working after rebind if
image url remained same because we are calling
view.closeAllSubscription() in bindView and didn't
call observeTintColor when imageUrl was same due to
if (isImageLoaded && newImageUrl == imageUrl) {
return
}
in applyImage
This commit is contained in:
@@ -87,6 +87,7 @@ internal class DivImageBinder @Inject constructor(
|
||||
private fun DivImageView.applyImage(divView: Div2View, resolver: ExpressionResolver, div: DivImage) {
|
||||
val newImageUrl = div.imageUrl.evaluate(resolver)
|
||||
if (isImageLoaded && newImageUrl == imageUrl) {
|
||||
observeTintColor(resolver, div.tintColor)
|
||||
return
|
||||
}
|
||||
// Ignore high priority preview if image was previously loaded.
|
||||
|
||||
Reference in New Issue
Block a user