diff options
Diffstat (limited to 'src/main/java/com/juick/Message.java')
-rw-r--r-- | src/main/java/com/juick/Message.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/com/juick/Message.java b/src/main/java/com/juick/Message.java index c6e10214..10f7c698 100644 --- a/src/main/java/com/juick/Message.java +++ b/src/main/java/com/juick/Message.java @@ -33,7 +33,7 @@ public class Message { private String Text = null; private User User = null; public List<String> Tags = new ArrayList<>(); - private Date date = null; + private Date date; public int TimeAgo = 0; public int Privacy = 1; public boolean FriendsOnly = false; @@ -48,7 +48,7 @@ public class Message { public Place Place = null; public int Likes = 0; public boolean UserLike = false; - public ArrayList<Message> childs = new ArrayList<>(); + public List<Message> childs = new ArrayList<>(); private Optional<PM> PM = Optional.empty(); Optional<Recommendation> Recommendation = Optional.empty(); @@ -122,16 +122,16 @@ public class Message { public int getChildsCount() { int cnt = childs.size(); - for (int i = 0; i < childs.size(); i++) { - cnt += childs.get(i).getChildsCount(); + for (Message child : childs) { + cnt += child.getChildsCount(); } return cnt; } public void cleanupChilds() { if (!childs.isEmpty()) { - for (int i = 0; i < childs.size(); i++) { - childs.get(i).cleanupChilds(); + for (Message child : childs) { + child.cleanupChilds(); } childs.clear(); } |