diff --git a/pom.xml b/pom.xml index eaf8f09..74f74dd 100644 --- a/pom.xml +++ b/pom.xml @@ -39,11 +39,10 @@ - org.gcube.distribution maven-portal-bom - LATEST + 3.6.0 pom import @@ -191,7 +190,7 @@ org.gcube.socialnetworking social-util-library - [1.0.0-SNAPSHOT,2.0.0-SNAPSHOT) + [1.7.2-SNAPSHOT,2.0.0-SNAPSHOT) compile diff --git a/src/main/java/org/gcube/portlets/user/newsfeed/client/ui/SingleComment.java b/src/main/java/org/gcube/portlets/user/newsfeed/client/ui/SingleComment.java index e1075b4..eef98ed 100644 --- a/src/main/java/org/gcube/portlets/user/newsfeed/client/ui/SingleComment.java +++ b/src/main/java/org/gcube/portlets/user/newsfeed/client/ui/SingleComment.java @@ -48,6 +48,7 @@ public class SingleComment extends Composite { @UiField HTML editImage; @UiField HTML seeMore; + @SuppressWarnings("deprecation") public SingleComment(Comment toShow, TweetTemplate owner, boolean isUsers) { initWidget(uiBinder.createAndBindUi(this)); sinkEvents(Event.ONPASTE); @@ -78,13 +79,8 @@ public class SingleComment extends Composite { } String commentToShow = toShow.getText(); - - //replace the < & and > -// commentToShow = commentToShow.replaceAll("<","<").replaceAll(">",">"); commentToShow = commentToShow.replaceAll("&","&"); - - if (commentToShow.length() > MAX_SHOWTEXT_LENGTH) { final int TEXT_TO_SHOW_LENGHT = (commentToShow.length() < 700) ? (commentToShow.length() - (commentToShow.length() / 3)) : 700; commentToShow = commentToShow.substring(0, TEXT_TO_SHOW_LENGHT) + "..."; @@ -132,7 +128,6 @@ public class SingleComment extends Composite { void onSeeMoreClick(ClickEvent e) { String commentToShow = myComment.getText(); //replace the < & and > - commentToShow = commentToShow.replaceAll("<","<").replaceAll(">",">"); commentToShow = commentToShow.replaceAll("&","&"); final String profilePageURL = GCubePortalConstants.PREFIX_GROUP_URL + NewsFeedPanel.extractOrgFriendlyURL(Location.getHref()) +GCubePortalConstants.USER_PROFILE_FRIENDLY_URL; diff --git a/src/main/java/org/gcube/portlets/user/newsfeed/client/ui/TweetTemplate.java b/src/main/java/org/gcube/portlets/user/newsfeed/client/ui/TweetTemplate.java index 2f4f5a3..6605c48 100644 --- a/src/main/java/org/gcube/portlets/user/newsfeed/client/ui/TweetTemplate.java +++ b/src/main/java/org/gcube/portlets/user/newsfeed/client/ui/TweetTemplate.java @@ -77,7 +77,7 @@ public class TweetTemplate extends Composite { private HTML showAllComments = new HTML(); private boolean isAppPost = false; private HTML submitCommentPreloader = new HTML("
"); - private TweetTemplate myInstance; + // Carousel from the image-previewer widget private Carousel carousel; @@ -133,6 +133,7 @@ public class TweetTemplate extends Composite { * @param displaySingle tells if you're displaying a single fedd or not * @param eventBus */ + @SuppressWarnings("deprecation") public TweetTemplate(boolean displaySingle, boolean showTimelineSource, UserInfo myUserInfo, EnhancedFeed myPost, HandlerManager eventBus) { initWidget(uiBinder.createAndBindUi(this)); commentsNo.getElement().getStyle().setPaddingTop(0, Unit.PX); @@ -142,7 +143,6 @@ public class TweetTemplate extends Composite { likesNo.getElement().getStyle().setPaddingLeft(2, Unit.PX); commentsNo.getElement().getStyle().setPaddingLeft(2, Unit.PX); - myInstance = this; this.myUserInfo = myUserInfo; this.vreSourceInMetadata.setVisible(false); this.separator.setVisible(false); @@ -191,7 +191,7 @@ public class TweetTemplate extends Composite { linkPreviewer.onFileNameClickOpenCarousel(carousel); // remove next and prev buttons of the carousel since we have only an image - carousel.hideArrows(); + carousel.showArrows(false); } @@ -278,7 +278,7 @@ public class TweetTemplate extends Composite { // hide arrows if there is no more than 1 image if(imagesAvailableInCarousel <= 1) - carousel.hideArrows(); + carousel.showArrows(false); } @@ -463,8 +463,6 @@ public class TweetTemplate extends Composite { @UiHandler("seeMore") void onSeeMoreClick(ClickEvent e) { String postText = myPost.getFeed().getDescription(); - //replace the < & and > - postText = postText.replaceAll("<","<").replaceAll(">",">"); postText = postText.replaceAll("&","&"); contentArea.setHTML(postText);