From be8fc9f15a8ca780114b120576f51aa354a5921a Mon Sep 17 00:00:00 2001 From: Ivan Kupalov Date: Sat, 1 Aug 2020 13:26:59 +0200 Subject: [PATCH] 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. --- .../java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt b/app/src/main/java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt index a4b7ea21..42513b23 100644 --- a/app/src/main/java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt +++ b/app/src/main/java/com/keylesspalace/tusky/fragment/ViewImageFragment.kt @@ -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) }