Always update image measures when actual known
Previuos measures might not what we actually display, e.g. for videos. Change-Id: I20a80c2ba61d3ca6dd62bde1d5c06d4738553f83
This commit is contained in:
parent
f2f15ed7e4
commit
b55a83a657
|
@ -147,7 +147,7 @@ class ImageContentRenderer @Inject constructor(private val localFilesHelper: Loc
|
|||
}
|
||||
|
||||
override fun onResourceReady(resource: Drawable?, model: Any?, target: Target<Drawable>?, dataSource: DataSource?, isFirstResource: Boolean): Boolean {
|
||||
if (resource != null && (data.width == null || data.height == null || data.width == 0 || data.height == 0)) {
|
||||
if (resource != null /*&& (data.width == null || data.height == null || data.width == 0 || data.height == 0)*/) {
|
||||
val updatedData = data.copy(width = resource.intrinsicWidth, height = resource.intrinsicHeight)
|
||||
val newSize = processSize(updatedData, mode)
|
||||
imageView.updateLayoutParams {
|
||||
|
|
Loading…
Reference in New Issue