diff options
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java index 476cfc8b..e3e06399 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java @@ -385,8 +385,21 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment { } @Override + public void onResume() { + super.onResume(); + SubsamplingScaleImageView ssiv = imageView.getSSIV(); + if (ssiv == null || !ssiv.hasImage()) { + imageView.showImage(Uri.parse(media.url)); + } + } + + @Override public void onDestroyView() { super.onDestroyView(); BigImageViewer.imageLoader().cancelAll(); + SubsamplingScaleImageView subsamplingScaleImageView = imageView.getSSIV(); + if (subsamplingScaleImageView != null) { + subsamplingScaleImageView.recycle(); + } } } |