aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/eu/siacs/conversations/ui/adapter/MessageAdapter.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
index ca475cc9..34fea41f 100644
--- a/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
+++ b/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
@@ -389,8 +389,11 @@ public class MessageAdapter extends ArrayAdapter<Message> {
viewHolder.contact_picture.setImageBitmap(mBitmapCache.get(
contact, getContext()));
} else {
- viewHolder.contact_picture.setImageBitmap(mBitmapCache.get(
- item.getCounterpart(), getContext()));
+ String name = item.getPresence();
+ if (name==null) {
+ name = item.getCounterpart();
+ }
+ viewHolder.contact_picture.setImageBitmap(mBitmapCache.get(name, getContext()));
}
viewHolder.contact_picture
.setOnClickListener(new OnClickListener() {