aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/Message.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/Message.java')
-rw-r--r--src/main/java/com/juick/Message.java18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/main/java/com/juick/Message.java b/src/main/java/com/juick/Message.java
index 263a247d..c128b4f2 100644
--- a/src/main/java/com/juick/Message.java
+++ b/src/main/java/com/juick/Message.java
@@ -47,10 +47,10 @@ public class Message implements Comparable {
public String Video = null;
public Place Place = null;
public int Likes = 0;
- public boolean UserLike = false;
+ private boolean liked = false;
public List<Message> childs = new ArrayList<>();
private Optional<PM> PM = Optional.empty();
- Optional<Recommendation> Recommendation = Optional.empty();
+ private Optional<Recommendation> Recommendation = Optional.empty();
public Message() {
}
@@ -74,7 +74,7 @@ public class Message implements Comparable {
Video = msg.Video;
Place = msg.Place;
Likes = msg.Likes;
- UserLike = msg.UserLike;
+ setLiked(msg.isLiked());
childs = msg.childs;
PM = msg.PM;
Recommendation = msg.Recommendation;
@@ -156,8 +156,8 @@ public class Message implements Comparable {
public String getTagsString() {
String ret = "";
if (!Tags.isEmpty()) {
- for (int i = 0; i < Tags.size(); i++) {
- ret += " *" + Tags.get(i);
+ for (String Tag : Tags) {
+ ret += " *" + Tag;
}
if (FriendsOnly) {
ret += " *friends";
@@ -233,4 +233,12 @@ public class Message implements Comparable {
public void setRecommendation(Recommendation recommendation) {
this.Recommendation = Optional.ofNullable(recommendation);
}
+
+ public boolean isLiked() {
+ return liked;
+ }
+
+ public void setLiked(boolean liked) {
+ this.liked = liked;
+ }
}