mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-12-26 05:28:58 +00:00
Parse group metadata associated with posts.
This commit is contained in:
parent
fb4b46074a
commit
9c39112bf7
@ -12,6 +12,11 @@ public enum PageType {
|
||||
/**
|
||||
* User page
|
||||
*/
|
||||
USER_PAGE
|
||||
USER_PAGE,
|
||||
|
||||
/**
|
||||
* Group page
|
||||
*/
|
||||
GROUP_PAGE
|
||||
|
||||
}
|
||||
|
@ -315,6 +315,12 @@ public class PostsHelper {
|
||||
post.setPage_id(json.getInt("user_page_id"));
|
||||
}
|
||||
|
||||
else if(json.getInt("group_id") != 0){
|
||||
//Set information about the user
|
||||
post.setPage_type(PageType.GROUP_PAGE);
|
||||
post.setPage_id(json.getInt("group_id"));
|
||||
}
|
||||
|
||||
|
||||
post.setContent(json.getString("content"));
|
||||
post.setComments_list(CommentsHelper.parse_json_array(json.getJSONArray("comments")));
|
||||
|
Loading…
Reference in New Issue
Block a user