From febad867a57cfa1ae33c83dd9c0ddf51a303eb03 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 3 Feb 2023 03:02:09 +0300 Subject: tag.isIgnored, tag.isSubscribed --- src/main/java/com/juick/www/controllers/Site.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/juick/www/controllers') 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); -- cgit v1.2.3