From c6972c05dcee19afb5725767f755a56f5162aee2 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 21 Oct 2021 22:52:14 +0300 Subject: Make popular feed equal to service user recommendations feed to have correct RSS feeds --- src/main/java/com/juick/www/controllers/Site.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (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 682ed247..9eb4c917 100644 --- a/src/main/java/com/juick/www/controllers/Site.java +++ b/src/main/java/com/juick/www/controllers/Site.java @@ -69,6 +69,8 @@ public class Site { private PMQueriesService pmQueriesService; @Inject private WebApp webApp; + @Inject + private User serviceUser; private void fillUserModel(ModelMap model, User user, User visitor) { user.setAvatar(webApp.getAvatarWebPath(user)); @@ -118,7 +120,7 @@ public class Site { mids = messagesService.getDiscussions(visitor.getUid(), paramTo); } else if (paramShow.equals("top")) { title = ResourceBundle.getBundle("messages", locale).getString("link.popular"); - mids = messagesService.getPopular(visitor.getUid(), paramBefore); + mids = messagesService.getUserBlogWithRecommendations(serviceUser, visitor, 0, paramBefore); model.addAttribute("discover", true); } else if (paramShow.equals("my") && !visitor.isAnonymous()) { title = ResourceBundle.getBundle("messages", locale).getString("link.my"); -- cgit v1.2.3