Resolved image display problems

This commit is contained in:
daniel oeh 2013-09-15 01:55:37 +02:00
parent 928bfa681f
commit 4d2275189e
4 changed files with 4 additions and 6 deletions

View File

@ -167,7 +167,6 @@ public class ExternalEpisodesListAdapter extends BaseExpandableListAdapter {
holder.lenSize.setVisibility(View.INVISIBLE);
}
holder.feedImage.setTag(item.getImageLoaderCacheKey());
ImageLoader.getInstance().loadThumbnailBitmap(
item,
holder.feedImage,

View File

@ -120,7 +120,6 @@ public class FeedlistAdapter extends BaseAdapter {
}
final String imageUrl = (feed.getImage() != null) ? feed.getImage()
.getFile_url() : null;
holder.image.setTag(imageUrl);
imageLoader.loadThumbnailBitmap(
feed.getImage(),
holder.image,

View File

@ -50,8 +50,8 @@ public class BitmapDecodeWorkerTask extends Thread {
* before the bitmap was decoded
*/
protected boolean tagsMatching(ImageView target) {
return target.getTag(R.id.imageloader_key) == null
|| target.getTag(R.id.imageloader_key).equals(imageResource.getImageLoaderCacheKey());
Object tag = target.getTag(R.id.imageloader_key);
return tag != null && tag.equals(imageResource.getImageLoaderCacheKey());
}
protected void onPostExecute() {

View File

@ -203,7 +203,7 @@ public class ImageDiskCache {
@Override
protected void onImageLoaded(DiskCacheObject diskCacheObject) {
final Object tag = target.getTag(R.id.image_disk_cache_key);
if (tag != null || StringUtils.equals((String) tag, url)) {
if (tag != null && StringUtils.equals((String) tag, url)) {
il.loadThumbnailBitmap(diskCacheObject.loadImage(), target, length);
}
}
@ -231,7 +231,7 @@ public class ImageDiskCache {
@Override
protected void onImageLoaded(DiskCacheObject diskCacheObject) {
final Object tag = target.getTag(R.id.image_disk_cache_key);
if (tag != null || StringUtils.equals((String) tag, url)) {
if (tag != null && StringUtils.equals((String) tag, url)) {
il.loadCoverBitmap(diskCacheObject.loadImage(), target, length);
}
}