From e516f02b58215d095e3a364b9b86656b484ee1ac Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Sat, 12 Apr 2014 16:16:52 +0700 Subject: User constructors --- src/com/juick/Message.java | 4 ++++ src/com/juick/User.java | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/com/juick/Message.java b/src/com/juick/Message.java index 4c81e2b7..eb8f5b9a 100644 --- a/src/com/juick/Message.java +++ b/src/com/juick/Message.java @@ -46,6 +46,8 @@ public class Message { public String Photo = null; public String Video = null; public Place Place = null; + public int Likes = 0; + public boolean UserLike = false; public ArrayList childs = new ArrayList(); public Message() { @@ -69,6 +71,8 @@ public class Message { Photo = msg.Photo; Video = msg.Video; Place = msg.Place; + Likes = msg.Likes; + UserLike = msg.UserLike; childs = msg.childs; } diff --git a/src/com/juick/User.java b/src/com/juick/User.java index 7ea9df4c..6dc5e90f 100644 --- a/src/com/juick/User.java +++ b/src/com/juick/User.java @@ -31,6 +31,19 @@ public class User { public int MessagesCount = 0; public String AuthHash = null; + public User() { + } + + public User(User u) { + UID = u.UID; + UName = u.UName; + Avatar = u.Avatar; + FullName = u.FullName; + JID = u.JID; + MessagesCount = u.MessagesCount; + AuthHash = u.AuthHash; + } + @Override public boolean equals(Object obj) { return (obj instanceof User && ((User) obj).UID == this.UID); -- cgit v1.2.3