aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-07-10 21:12:13 +0300
committerGravatar Vitaly Takmazov2016-07-10 21:12:13 +0300
commitcc192146f434263b73fb965e566e2829e70f209e (patch)
tree96924030c8193e80ee41597d352c47dfe83df0bf /juick-www/src/main
parentcd3ad1e7ef0fe1b66537374be8d3e4f1221cb24d (diff)
fix user tags page
Diffstat (limited to 'juick-www/src/main')
-rw-r--r--juick-www/src/main/java/com/juick/www/User.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/juick-www/src/main/java/com/juick/www/User.java b/juick-www/src/main/java/com/juick/www/User.java
index 549e38af..ae1aee2a 100644
--- a/juick-www/src/main/java/com/juick/www/User.java
+++ b/juick-www/src/main/java/com/juick/www/User.java
@@ -321,7 +321,7 @@ public class User {
List<Tag> tags = TagQueries.getUserTagsAll(sql, user.getUID());
int maxUsageCnt = tags.stream().map(t -> t.UsageCnt).max(Integer::max).orElse(0);
String ret = "";
- int count = Math.min(tags.size(), cnt);
+ int count = cnt > 0 ? Math.min(tags.size(), cnt) : tags.size();
for (int i = 0; i < count; i++) {
String tag = Utils.encodeHTML(tags.get(i).Name);
try {