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)
.dontAnimate()
.onlyRetrieveFromCache(true)
.centerInside()
.addListener(ImageRequestListener(true, isThumnailRequest = true)))
else it
}
@ -213,6 +214,7 @@ class ViewImageFragment : ViewMediaFragment() {
.centerInside()
.addListener(ImageRequestListener(false, isThumnailRequest = false))
)
.centerInside()
.addListener(ImageRequestListener(true, isThumnailRequest = false))
.into(photoView)
}