mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-12-27 22:18:58 +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;
|
||||
|
||||
@Override
|
||||
public void onAttach(Context context) {
|
||||
super.onAttach(context);
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
//Create notifications helper
|
||||
mNotificationsHelper = new NotificationsHelper(context);
|
||||
mNotificationsHelper = new NotificationsHelper(getActivity());
|
||||
|
||||
//Create get users helper
|
||||
mUsersInfoHelper = new GetUsersHelper(context);
|
||||
mUsersInfoHelper = new GetUsersHelper(getActivity());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@ -65,23 +65,18 @@ public class SinglePostFragment extends Fragment {
|
||||
*/
|
||||
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
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
//Get post ID
|
||||
mPostID = getArguments().getInt(ARGUMENT_POST_ID);
|
||||
|
||||
//Create post helper
|
||||
mPostsHelper = new PostsHelper(getActivity());
|
||||
|
||||
//Create get user helper
|
||||
mGetUserHelper = new GetUsersHelper(getActivity());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
Loading…
Reference in New Issue
Block a user