aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/utils/UIHelper.java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-12-02 23:59:02 +0100
committeriNPUTmice <daniel@gultsch.de>2014-12-03 00:06:57 +0100
commit241de062dad6376e5320138a870d9c0642f52126 (patch)
tree548f87c3eb32cf5b0b9225a11c67f105fbc94f37 /src/main/java/eu/siacs/conversations/utils/UIHelper.java
parent9dd445a50750c3518fa94116f31c2b9e6184d55c (diff)
cleaned up avatar / tile creation
Diffstat (limited to 'src/main/java/eu/siacs/conversations/utils/UIHelper.java')
-rw-r--r--src/main/java/eu/siacs/conversations/utils/UIHelper.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/utils/UIHelper.java b/src/main/java/eu/siacs/conversations/utils/UIHelper.java
index 341b3d773..28a2bb4c4 100644
--- a/src/main/java/eu/siacs/conversations/utils/UIHelper.java
+++ b/src/main/java/eu/siacs/conversations/utils/UIHelper.java
@@ -128,6 +128,9 @@ public class UIHelper {
}
public static int getColorForName(String name) {
+ if (name.isEmpty()) {
+ return 0xFF202020;
+ }
int colors[] = {0xFFe91e63, 0xFF9c27b0, 0xFF673ab7, 0xFF3f51b5,
0xFF5677fc, 0xFF03a9f4, 0xFF00bcd4, 0xFF009688, 0xFFff5722,
0xFF795548, 0xFF607d8b};