Fix for editing existing poi crash.
This commit is contained in:
parent
9a7796026e
commit
092da3d2ea
1 changed files with 3 additions and 11 deletions
|
@ -159,9 +159,7 @@ public class EditPoiFragment extends DialogFragment {
|
|||
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
FragmentManager fragmentManager = getActivity().getSupportFragmentManager();
|
||||
fragmentManager.beginTransaction().remove(EditPoiFragment.this).commit();
|
||||
fragmentManager.popBackStack();
|
||||
dismiss();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -325,11 +323,7 @@ public class EditPoiFragment extends DialogFragment {
|
|||
if (getActivity() instanceof MapActivity) {
|
||||
((MapActivity) getActivity()).getMapView().refreshMap(true);
|
||||
}
|
||||
FragmentManager fragmentManager =
|
||||
getActivity().getSupportFragmentManager();
|
||||
fragmentManager.beginTransaction().remove(EditPoiFragment.this)
|
||||
.commit();
|
||||
fragmentManager.popBackStack();
|
||||
dismiss();
|
||||
}
|
||||
}, getActivity(), mOpenstreetmapUtil);
|
||||
|
||||
|
@ -515,9 +509,7 @@ public class EditPoiFragment extends DialogFragment {
|
|||
if (n != null) {
|
||||
EditPoiFragment fragment =
|
||||
EditPoiFragment.createInstance(n, amenity);
|
||||
activity.getSupportFragmentManager().beginTransaction()
|
||||
.add(R.id.fragmentContainer, fragment, "EditPoiFragment")
|
||||
.addToBackStack(null).commit();
|
||||
fragment.show(activity.getSupportFragmentManager(), TAG);
|
||||
} else {
|
||||
AccessibleToast.makeText(activity,
|
||||
activity.getString(R.string.poi_error_poi_not_found),
|
||||
|
|
Loading…
Reference in a new issue