use of com.nixmash.blog.jpa.enums.PostDisplayType in project nixmash-blog by mintster.
the class JsoupServiceImpl method getTwitterImage.
private String getTwitterImage(PostDTO postDTO) {
String twitterImage = applicationSettings.getTwitterImage();
PostDisplayType postDisplayType = postDTO.getDisplayType();
if (postDisplayType == PostDisplayType.MULTIPHOTO_POST || postDisplayType == PostDisplayType.SINGLEPHOTO_POST) {
List<PostImage> postImages = postService.getPostImages(postDTO.getPostId());
if (!postImages.isEmpty()) {
PostImage postImage = postImages.get(0);
twitterImage = postImage.getUrl() + postImage.getNewFilename();
}
}
return twitterImage;
}
Aggregations