aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-07-30 21:25:59 +0200
committeriNPUTmice <daniel@gultsch.de>2014-07-30 21:25:59 +0200
commitbc24cf93abb3937af045c378f1e928ab96a9156e (patch)
treebf90b65862af2cc3e1c6aee11022219d4f8cbe85 /src/eu
parentfe46d361374054ed0cd4ecc29482491ecf2bb1fc (diff)
fixed generation of muc pictures with copyonwrite user list
Diffstat (limited to 'src/eu')
-rw-r--r--src/eu/siacs/conversations/utils/UIHelper.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/eu/siacs/conversations/utils/UIHelper.java b/src/eu/siacs/conversations/utils/UIHelper.java
index 1cd3403c6..d14970f5c 100644
--- a/src/eu/siacs/conversations/utils/UIHelper.java
+++ b/src/eu/siacs/conversations/utils/UIHelper.java
@@ -214,13 +214,17 @@ public class UIHelper {
new String[] { conversation.getName(false) }, size,
bgColor, fgColor);
}
- String[] names = new String[members.size() + 1];
- names[0] = conversation.getMucOptions().getActualNick();
- for (int i = 0; i < members.size(); ++i) {
- names[i + 1] = members.get(i).getName();
+ ArrayList<String> names = new ArrayList<String>();
+ names.add(conversation.getMucOptions().getActualNick());
+ for(User user : members) {
+ names.add(user.getName());
+ if (names.size() > 4 ) {
+ break;
+ }
}
-
- return getUnknownContactPicture(names, size, bgColor, fgColor);
+ String[] mArrayNames = new String[names.size()];
+ names.toArray(mArrayNames);
+ return getUnknownContactPicture(mArrayNames, size, bgColor, fgColor);
}
public static Bitmap getContactPicture(Conversation conversation,