diff options
author | Vitaly Takmazov | 2023-02-03 03:02:09 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-02-03 03:39:43 +0300 |
commit | febad867a57cfa1ae33c83dd9c0ddf51a303eb03 (patch) | |
tree | d21e0c5f1f2d9d5356a26aaaf6651418bd34049c /src/main/java/com/juick/www/controllers | |
parent | 22aaf28c779725962a3ebec3e689bef35fe05085 (diff) |
tag.isIgnored, tag.isSubscribed
Diffstat (limited to 'src/main/java/com/juick/www/controllers')
-rw-r--r-- | src/main/java/com/juick/www/controllers/Site.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/juick/www/controllers/Site.java b/src/main/java/com/juick/www/controllers/Site.java index 2a1c89ae..9773c098 100644 --- a/src/main/java/com/juick/www/controllers/Site.java +++ b/src/main/java/com/juick/www/controllers/Site.java @@ -397,7 +397,7 @@ public class Site { @RequestParam(required = false, defaultValue = "0") int before, ModelMap model) { visitor.setAvatar(webApp.getAvatarWebPath(visitor)); String paramTagStr = StringEscapeUtils.unescapeHtml4(tagName); - Tag paramTag = tagService.getTag(paramTagStr, false); + Tag paramTag = tagService.getTag(visitor.getUid(), paramTagStr, false); if (paramTag == null) { throw new HttpNotFoundException(); } else if (paramTag.getSynonymId() > 0 && paramTag.getId() != paramTag.getSynonymId()) { @@ -445,8 +445,8 @@ public class Site { model.addAttribute("msgs", msgs); model.addAttribute("tags", tagService.getPopularTags()); model.addAttribute("noindex", before > 0); - model.addAttribute("isSubscribed", tagService.isSubscribed(visitor, paramTag)); - model.addAttribute("isInBL", tagService.isInBL(visitor, paramTag)); + model.addAttribute("isSubscribed", paramTag.isSubscribed()); + model.addAttribute("isInBL", paramTag.isIgnored()); if (mids.size() >= 20) { String nextpage = "/tag/" + URLEncoder.encode(paramTag.getName(), StandardCharsets.UTF_8) + "?before=" + mids.get(mids.size() - 1); |