diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2014-03-28 20:17:15 +0100 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2014-03-28 20:17:15 +0100 |
commit | ae09dbffb6746641a5658750085af08f5ff60e47 (patch) | |
tree | 846820ec7b94abb70b698fa93999f127466e4275 /src/de/danoeh/antennapod/asynctask/ImageLoader.java | |
parent | 2c68f8197b6c3048bf460df9c02eae11aabb6184 (diff) | |
download | AntennaPod-ae09dbffb6746641a5658750085af08f5ff60e47.zip |
Fixed image loading bugs
- If a feed contained items with non-unique image URLs, those images were not displayed
- Images in a list were not loaded correctly if the list contained entries without an image
Diffstat (limited to 'src/de/danoeh/antennapod/asynctask/ImageLoader.java')
-rw-r--r-- | src/de/danoeh/antennapod/asynctask/ImageLoader.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/de/danoeh/antennapod/asynctask/ImageLoader.java b/src/de/danoeh/antennapod/asynctask/ImageLoader.java index c49d7549b..b50502ea8 100644 --- a/src/de/danoeh/antennapod/asynctask/ImageLoader.java +++ b/src/de/danoeh/antennapod/asynctask/ImageLoader.java @@ -26,6 +26,12 @@ public class ImageLoader { public static final int IMAGE_TYPE_THUMBNAIL = 0; public static final int IMAGE_TYPE_COVER = 1; + /** + * Used by loadThumbnailBitmap and loadCoverBitmap to denote an ImageView that displays the default image resource. + * This is the case if the given source to load the image from was null or did not return any image data. + */ + private static final Object DEFAULT_IMAGE_RESOURCE_TAG = new Object(); + private Handler handler; private ExecutorService executor; @@ -122,6 +128,7 @@ public class ImageLoader { } } else { target.setImageResource(defaultCoverResource); + target.setTag(R.id.imageloader_key, DEFAULT_IMAGE_RESOURCE_TAG); } } @@ -163,6 +170,7 @@ public class ImageLoader { } } else { target.setImageResource(defaultCoverResource); + target.setTag(R.id.imageloader_key, DEFAULT_IMAGE_RESOURCE_TAG); } } |