mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-11-23 22:09:30 +00:00
Fix a issue on Android 5.0
This commit is contained in:
parent
fb113c0506
commit
104ddfb8cb
@ -85,14 +85,14 @@ public class NotificationsFragment extends Fragment implements View.OnCreateCont
|
|||||||
private onPostOpenListener mOpenPostListener;
|
private onPostOpenListener mOpenPostListener;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAttach(Context context) {
|
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
super.onAttach(context);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
//Create notifications helper
|
//Create notifications helper
|
||||||
mNotificationsHelper = new NotificationsHelper(context);
|
mNotificationsHelper = new NotificationsHelper(getActivity());
|
||||||
|
|
||||||
//Create get users helper
|
//Create get users helper
|
||||||
mUsersInfoHelper = new GetUsersHelper(context);
|
mUsersInfoHelper = new GetUsersHelper(getActivity());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@ -65,23 +65,18 @@ public class SinglePostFragment extends Fragment {
|
|||||||
*/
|
*/
|
||||||
private GetUsersHelper mGetUserHelper;
|
private GetUsersHelper mGetUserHelper;
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onAttach(Context context) {
|
|
||||||
super.onAttach(context);
|
|
||||||
|
|
||||||
//Create post helper
|
|
||||||
mPostsHelper = new PostsHelper(context);
|
|
||||||
|
|
||||||
//Create get user helper
|
|
||||||
mGetUserHelper = new GetUsersHelper(context);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
//Get post ID
|
//Get post ID
|
||||||
mPostID = getArguments().getInt(ARGUMENT_POST_ID);
|
mPostID = getArguments().getInt(ARGUMENT_POST_ID);
|
||||||
|
|
||||||
|
//Create post helper
|
||||||
|
mPostsHelper = new PostsHelper(getActivity());
|
||||||
|
|
||||||
|
//Create get user helper
|
||||||
|
mGetUserHelper = new GetUsersHelper(getActivity());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
Loading…
Reference in New Issue
Block a user