mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-30 12:57:12 +01:00
Fix sometimes images in a Reddit Gallery cannot be loaded.
This commit is contained in:
parent
3ce5664aea
commit
5924c921cf
@ -384,9 +384,22 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment {
|
|||||||
activity = (ViewRedditGalleryActivity) context;
|
activity = (ViewRedditGalleryActivity) context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
SubsamplingScaleImageView ssiv = imageView.getSSIV();
|
||||||
|
if (ssiv == null || !ssiv.hasImage()) {
|
||||||
|
imageView.showImage(Uri.parse(media.url));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroyView() {
|
public void onDestroyView() {
|
||||||
super.onDestroyView();
|
super.onDestroyView();
|
||||||
BigImageViewer.imageLoader().cancelAll();
|
BigImageViewer.imageLoader().cancelAll();
|
||||||
|
SubsamplingScaleImageView subsamplingScaleImageView = imageView.getSSIV();
|
||||||
|
if (subsamplingScaleImageView != null) {
|
||||||
|
subsamplingScaleImageView.recycle();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user