mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-29 04:17: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;
|
||||
}
|
||||
|
||||
@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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user