aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/util/ImageLoader.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/util/ImageLoader.java b/subsonic-android/src/github/daneren2005/dsub/util/ImageLoader.java
index 1fb5f083..331bc629 100644
--- a/subsonic-android/src/github/daneren2005/dsub/util/ImageLoader.java
+++ b/subsonic-android/src/github/daneren2005/dsub/util/ImageLoader.java
@@ -101,7 +101,10 @@ public class ImageLoader implements Runnable {
}
public void loadImage(View view, MusicDirectory.Entry entry, boolean large, boolean crossfade) {
- if (entry == null || entry.getCoverArt() == null) {
+ if (largeUnknownImage != null && ((BitmapDrawable)largeUnknownImage).getBitmap().isRecycled())
+ createLargeUnknownImage(view.getContext());
+
+ if (entry == null || entry.getCoverArt() == null) {
setUnknownImage(view, large);
return;
}
@@ -116,15 +119,18 @@ public class ImageLoader implements Runnable {
}
return;
}
-
- if (!large) {
+
+ if (!large) {
setUnknownImage(view, large);
}
queue.offer(new Task(view.getContext(), entry, size, imageSizeLarge, large, new ViewTaskHandler(view, crossfade)));
}
public void loadImage(Context context, RemoteControlClient remoteControl, MusicDirectory.Entry entry) {
- if (entry == null || entry.getCoverArt() == null) {
+ if (largeUnknownImage != null && ((BitmapDrawable)largeUnknownImage).getBitmap().isRecycled())
+ createLargeUnknownImage(context);
+
+ if (entry == null || entry.getCoverArt() == null) {
setUnknownImage(remoteControl);
return;
}