From f52bc4f0beff94a5a70477b64038073f1534c043 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Sun, 22 Feb 2015 13:15:27 +0100 Subject: [PATCH] properly remove invalid avatar --- .../eu/siacs/conversations/ui/adapter/ConversationAdapter.java | 1 + .../java/eu/siacs/conversations/ui/adapter/ListItemAdapter.java | 1 + 2 files changed, 2 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java index 3e747b0a5..a48f6ae43 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java @@ -142,6 +142,7 @@ public class ConversationAdapter extends ArrayAdapter { imageView.setBackgroundColor(0x00000000); } else { imageView.setBackgroundColor(UIHelper.getColorForName(conversation.getName())); + imageView.setImageDrawable(null); final BitmapWorkerTask task = new BitmapWorkerTask(imageView); final AsyncDrawable asyncDrawable = new AsyncDrawable(activity.getResources(), null, task); imageView.setImageDrawable(asyncDrawable); diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/ListItemAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/ListItemAdapter.java index 60e470190..7b20b55fc 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/ListItemAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/ListItemAdapter.java @@ -128,6 +128,7 @@ public class ListItemAdapter extends ArrayAdapter { imageView.setBackgroundColor(0x00000000); } else { imageView.setBackgroundColor(UIHelper.getColorForName(item.getDisplayName())); + imageView.setImageDrawable(null); final BitmapWorkerTask task = new BitmapWorkerTask(imageView); final AsyncDrawable asyncDrawable = new AsyncDrawable(activity.getResources(), null, task); imageView.setImageDrawable(asyncDrawable);