aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/entities/MucOptions.java
diff options
context:
space:
mode:
authorlookshe <github@lookshe.org>2016-03-20 02:29:46 +0100
committerlookshe <github@lookshe.org>2016-03-20 02:29:46 +0100
commitad8e8344c0c051dd22adf76df624dd16cabcea28 (patch)
treea8e5818ef393087eb406df9d26bef3b36caa3f75 /src/main/java/de/thedevstack/conversationsplus/entities/MucOptions.java
parent6de11f38eaeb758692e0690f7150556d46d1f674 (diff)
parentfb00372269ab0ed9ed0fbc1bd502695ffc17dd1b (diff)
Merge branch 'trz/rebase' (early part) into trz/rename
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/entities/MucOptions.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/entities/MucOptions.java13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/entities/MucOptions.java b/src/main/java/de/thedevstack/conversationsplus/entities/MucOptions.java
index 128e5423..4a330f30 100644
--- a/src/main/java/de/thedevstack/conversationsplus/entities/MucOptions.java
+++ b/src/main/java/de/thedevstack/conversationsplus/entities/MucOptions.java
@@ -345,17 +345,8 @@ public class MucOptions {
}
public List<User> getUsers(int max) {
- ArrayList<User> users = new ArrayList<>();
- int i = 1;
- for(User user : this.users.values()) {
- users.add(user);
- if (i >= max) {
- break;
- } else {
- ++i;
- }
- }
- return users;
+ ArrayList<User> users = getUsers();
+ return users.subList(0, Math.min(max, users.size()));
}
public int getUserCount() {