|
@ -47,6 +47,7 @@ public class Post extends TopicItem { |
|
|
private final String personalText; |
|
|
private final String personalText; |
|
|
private final int numberOfStars; |
|
|
private final int numberOfStars; |
|
|
private final boolean isUserMentionedInPost; |
|
|
private final boolean isUserMentionedInPost; |
|
|
|
|
|
private final boolean isUserOnline; |
|
|
|
|
|
|
|
|
// Suppresses default constructor
|
|
|
// Suppresses default constructor
|
|
|
@SuppressWarnings("unused") |
|
|
@SuppressWarnings("unused") |
|
@ -73,6 +74,7 @@ public class Post extends TopicItem { |
|
|
postURL = null; |
|
|
postURL = null; |
|
|
postDeleteURL = null; |
|
|
postDeleteURL = null; |
|
|
postEditURL = null; |
|
|
postEditURL = null; |
|
|
|
|
|
isUserOnline = false; |
|
|
isUserMentionedInPost = false; |
|
|
isUserMentionedInPost = false; |
|
|
postType = -1; |
|
|
postType = -1; |
|
|
} |
|
|
} |
|
@ -101,13 +103,14 @@ public class Post extends TopicItem { |
|
|
* @param attachedFiles post's attached files |
|
|
* @param attachedFiles post's attached files |
|
|
* @param lastEdit post's last edit date |
|
|
* @param lastEdit post's last edit date |
|
|
* @param postURL post's URL |
|
|
* @param postURL post's URL |
|
|
|
|
|
* @param isUserOnline author's online status |
|
|
*/ |
|
|
*/ |
|
|
public Post(@Nullable String thumbnailUrl, String author, String subject, String content |
|
|
public Post(@Nullable String thumbnailUrl, String author, String subject, String content |
|
|
, String bbContent, int postIndex, int postNumber, String postDate, String profileURl, @Nullable String rank |
|
|
, String bbContent, int postIndex, int postNumber, String postDate, String profileURl, @Nullable String rank |
|
|
, @Nullable String special_rank, @Nullable String gender, @Nullable String numberOfPosts |
|
|
, @Nullable String special_rank, @Nullable String gender, @Nullable String numberOfPosts |
|
|
, @Nullable String personalText, int numberOfStars, int userColor |
|
|
, @Nullable String personalText, int numberOfStars, int userColor |
|
|
, @Nullable ArrayList<ThmmyFile> attachedFiles, @Nullable String lastEdit, String postURL |
|
|
, @Nullable ArrayList<ThmmyFile> attachedFiles, @Nullable String lastEdit, String postURL |
|
|
, @Nullable String postDeleteURL, @Nullable String postEditURL, boolean isUserMentionedInPost |
|
|
, @Nullable String postDeleteURL, @Nullable String postEditURL, boolean isUserOnline, boolean isUserMentionedInPost |
|
|
, int postType) { |
|
|
, int postType) { |
|
|
this.bbContent = bbContent; |
|
|
this.bbContent = bbContent; |
|
|
if (Objects.equals(thumbnailUrl, "")) this.thumbnailUrl = null; |
|
|
if (Objects.equals(thumbnailUrl, "")) this.thumbnailUrl = null; |
|
@ -132,6 +135,7 @@ public class Post extends TopicItem { |
|
|
this.postURL = postURL; |
|
|
this.postURL = postURL; |
|
|
this.postDeleteURL = postDeleteURL; |
|
|
this.postDeleteURL = postDeleteURL; |
|
|
this.postEditURL = postEditURL; |
|
|
this.postEditURL = postEditURL; |
|
|
|
|
|
this.isUserOnline = isUserOnline; |
|
|
this.isUserMentionedInPost = isUserMentionedInPost; |
|
|
this.isUserMentionedInPost = isUserMentionedInPost; |
|
|
this.postType = postType; |
|
|
this.postType = postType; |
|
|
} |
|
|
} |
|
@ -182,6 +186,7 @@ public class Post extends TopicItem { |
|
|
this.postURL = postURL; |
|
|
this.postURL = postURL; |
|
|
this.postDeleteURL = postDeleteURL; |
|
|
this.postDeleteURL = postDeleteURL; |
|
|
this.postEditURL = postEditURL; |
|
|
this.postEditURL = postEditURL; |
|
|
|
|
|
this.isUserOnline = false; |
|
|
this.isUserMentionedInPost = isUserMentionedInPost; |
|
|
this.isUserMentionedInPost = isUserMentionedInPost; |
|
|
this.postType = postType; |
|
|
this.postType = postType; |
|
|
} |
|
|
} |
|
@ -362,6 +367,17 @@ public class Post extends TopicItem { |
|
|
return userColor; |
|
|
return userColor; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Gets the online status of this post's author. |
|
|
|
|
|
* |
|
|
|
|
|
* @return online status of this post's author |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
@Nullable |
|
|
|
|
|
public boolean getUserOnlineStatus() { |
|
|
|
|
|
return isUserOnline; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Gets this post's attached files. |
|
|
* Gets this post's attached files. |
|
|
* |
|
|
* |
|
|