Fix issue that prevented to create posts on user page

This commit is contained in:
Pierre HUBERT 2019-02-26 08:05:43 +01:00
parent 8b6c64fd2a
commit 797b0ae09b

View File

@ -251,12 +251,15 @@ public class PostsCreateFormFragment extends Fragment {
CreatePost post = new CreatePost();
//Determine the type and the ID of the page
assert getArguments() != null;
switch (getArguments().getInt(PAGE_TYPE_ARG)){
case PAGE_TYPE_USER:
post.setPage_type(PageType.USER_PAGE);
break;
case PAGE_TYPE_GROUP:
post.setPage_type(PageType.GROUP_PAGE);
break;
}
post.setPage_id(getArguments().getInt(PAGE_ID_ARG));