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
This commit is contained in:
Massimiliano Assante 2018-03-19 11:47:54 +00:00
parent 0f74f5dada
commit ef5a20aeba
1 changed files with 11 additions and 29 deletions

View File

@ -402,6 +402,9 @@ public class NewsFeedPanel extends Composite {
case MINE: case MINE:
showOnlyMyPosts(); showOnlyMyPosts();
break; break;
case RECENT_COMMENTS:
checkAllUpdatesFeeds();
break;
default: default:
break; break;
} }
@ -767,35 +770,14 @@ public class NewsFeedPanel extends Composite {
newsPanel.insert(tt, 0); //insert in the view newsPanel.insert(tt, 0); //insert in the view
allUpdates.add(0, feed); //insert in the model allUpdates.add(0, feed); //insert in the model
// //timer for the transition //timer for the transition
// Timer t = new Timer() { Timer t = new Timer() {
// @Override @Override
// public void run() { public void run() {
// tt.setcontentAreaStyle("visible"); tt.setcontentAreaStyle("visible");
// }
// // alert the user-statistics portlet to update statistics in case };
// // one or more feed belongs to user himself t.schedule(100);
// 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);
} }
//after that I remove the ($updatesNo) from Window Title //after that I remove the ($updatesNo) from Window Title
String currTitle = Document.get().getTitle(); String currTitle = Document.get().getTitle();