From ef5a20aebaab79e50375df975645158b7e9ec80e Mon Sep 17 00:00:00 2001 From: Massimiliano Assante Date: Mon, 19 Mar 2018 11:47:54 +0000 Subject: [PATCH] fixed bug not showing posts done when the NewsFeed loaded already the posts git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/news-feed@165242 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../newsfeed/client/panels/NewsFeedPanel.java | 40 +++++-------------- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/newsfeed/client/panels/NewsFeedPanel.java b/src/main/java/org/gcube/portlets/user/newsfeed/client/panels/NewsFeedPanel.java index cfa53d5..a52dd25 100644 --- a/src/main/java/org/gcube/portlets/user/newsfeed/client/panels/NewsFeedPanel.java +++ b/src/main/java/org/gcube/portlets/user/newsfeed/client/panels/NewsFeedPanel.java @@ -402,6 +402,9 @@ public class NewsFeedPanel extends Composite { case MINE: showOnlyMyPosts(); break; + case RECENT_COMMENTS: + checkAllUpdatesFeeds(); + break; default: break; } @@ -767,35 +770,14 @@ public class NewsFeedPanel extends Composite { newsPanel.insert(tt, 0); //insert in the view allUpdates.add(0, feed); //insert in the model - // //timer for the transition - // Timer t = new Timer() { - // @Override - // public void run() { - // tt.setcontentAreaStyle("visible"); - // - // // alert the user-statistics portlet to update statistics in case - // // one or more feed belongs to user himself - // if(tt.isUser()){ - // try{ - // - // NewsFeed.pageBusAdapter.PageBusPublish(PageBusEvents.postIncrement, "", Defaults.STRING_JSONIZER); - // - // int numComments = tt.numberOfComments(); - // int numLikes = tt.numberOfLikes(); - // - // for(int i = 0; i < numComments; i++) - // NewsFeed.pageBusAdapter.PageBusPublish(PageBusEvents.commentsIncrement, "", Defaults.STRING_JSONIZER); - // - // for(int i = 0; i < numLikes; i++) - // NewsFeed.pageBusAdapter.PageBusPublish(PageBusEvents.likesIncrement, "", Defaults.STRING_JSONIZER); - // - // }catch (PageBusAdapterException ex) { - // GWT.log(ex.toString()); - // } - // } - // } - // }; - // t.schedule(100); + //timer for the transition + Timer t = new Timer() { + @Override + public void run() { + tt.setcontentAreaStyle("visible"); + } + }; + t.schedule(100); } //after that I remove the ($updatesNo) from Window Title String currTitle = Document.get().getTitle();