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:
SpiritCroc 2021-08-18 12:55:49 +02:00
parent f2f15ed7e4
commit b55a83a657
1 changed files with 1 additions and 1 deletions

View File

@ -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 {