aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/ui/adapter
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2015-02-22 13:15:27 +0100
committeriNPUTmice <daniel@gultsch.de>2015-02-22 13:15:27 +0100
commitf52bc4f0beff94a5a70477b64038073f1534c043 (patch)
treeb461e52b2658cc478806c40cb6a6bd14b7375dc0 /src/main/java/eu/siacs/conversations/ui/adapter
parent3db5a48529949b2219b036495f412ea383707524 (diff)
properly remove invalid avatar
Diffstat (limited to 'src/main/java/eu/siacs/conversations/ui/adapter')
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/ConversationAdapter.java1
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/ListItemAdapter.java1
2 files changed, 2 insertions, 0 deletions
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<Conversation> {
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<ListItem> {
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);