Fix crash in the image viewer (#1871)

This is imperfect as it probably reduces quality of the image but it
fixes the crash for now.
This commit is contained in:
Ivan Kupalov 2020-08-01 13:26:59 +02:00 committed by GitHub
parent 467c33aacb
commit be8fc9f15a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -205,6 +205,7 @@ class ViewImageFragment : ViewMediaFragment() {
.load(previewUrl) .load(previewUrl)
.dontAnimate() .dontAnimate()
.onlyRetrieveFromCache(true) .onlyRetrieveFromCache(true)
.centerInside()
.addListener(ImageRequestListener(true, isThumnailRequest = true))) .addListener(ImageRequestListener(true, isThumnailRequest = true)))
else it else it
} }
@ -213,6 +214,7 @@ class ViewImageFragment : ViewMediaFragment() {
.centerInside() .centerInside()
.addListener(ImageRequestListener(false, isThumnailRequest = false)) .addListener(ImageRequestListener(false, isThumnailRequest = false))
) )
.centerInside()
.addListener(ImageRequestListener(true, isThumnailRequest = false)) .addListener(ImageRequestListener(true, isThumnailRequest = false))
.into(photoView) .into(photoView)
} }