aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui/adapter
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/adapter')
-rw-r--r--src/main/java/de/pixart/messenger/ui/adapter/AccountAdapter.java2
-rw-r--r--src/main/java/de/pixart/messenger/ui/adapter/ListItemAdapter.java3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/adapter/AccountAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/AccountAdapter.java
index 0c1c5cc0a..451e326e6 100644
--- a/src/main/java/de/pixart/messenger/ui/adapter/AccountAdapter.java
+++ b/src/main/java/de/pixart/messenger/ui/adapter/AccountAdapter.java
@@ -98,7 +98,7 @@ public class AccountAdapter extends ArrayAdapter<Account> {
imageView.setImageBitmap(bm);
imageView.setBackgroundColor(0x00000000);
} else {
- imageView.setBackgroundColor(UIHelper.getColorForName(account.getDisplayName()));
+ imageView.setBackgroundColor(UIHelper.getColorForName(account.getJid().toBareJid().toString()));
imageView.setImageDrawable(null);
final BitmapWorkerTask task = new BitmapWorkerTask(imageView);
final AsyncDrawable asyncDrawable = new AsyncDrawable(activity.getResources(), null, task);
diff --git a/src/main/java/de/pixart/messenger/ui/adapter/ListItemAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/ListItemAdapter.java
index aaebf9862..8b4af00d8 100644
--- a/src/main/java/de/pixart/messenger/ui/adapter/ListItemAdapter.java
+++ b/src/main/java/de/pixart/messenger/ui/adapter/ListItemAdapter.java
@@ -160,7 +160,8 @@ public class ListItemAdapter extends ArrayAdapter<ListItem> {
imageView.setImageBitmap(bm);
imageView.setBackgroundColor(0x00000000);
} else {
- imageView.setBackgroundColor(UIHelper.getColorForName(item.getDisplayName()));
+ String seed = item.getJid() != null ? item.getJid().toBareJid().toString() : item.getDisplayName();
+ imageView.setBackgroundColor(UIHelper.getColorForName(seed));
imageView.setImageDrawable(null);
final BitmapWorkerTask task = new BitmapWorkerTask(imageView);
final AsyncDrawable asyncDrawable = new AsyncDrawable(activity.getResources(), null, task);