1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-30 04:42:18 -05:00

NamesHandler: cache field lookup

This commit is contained in:
Sebastian Kaspari 2010-03-21 16:36:44 +01:00
parent b855bb8790
commit 04e496dc98

View File

@ -50,10 +50,13 @@ public class NamesHandler extends BaseHandler
}
StringBuffer userList = new StringBuffer("Users " + conversation.getName() + ":");
for (User user : service.getConnection(server.getId()).getUsers(conversation.getName())) {
User[] mUsers = service.getConnection(server.getId()).getUsers(conversation.getName());
int mSize = mUsers.length;
for (int i = 0; i < mSize; i++) {
userList.append(" ");
userList.append(user.getPrefix());
userList.append(user.getNick());
userList.append(mUsers[i].getPrefix());
userList.append(mUsers[i].getNick());
}
Message message = new Message(userList.toString());