Merge pull request #4604 from osmandapp/fix_4577

Fix #4577
This commit is contained in:
Alexey 2017-10-17 18:59:09 +03:00 committed by GitHub
commit 66c2b4b7fe

View file

@ -4,6 +4,7 @@ import android.annotation.SuppressLint;
import android.os.Bundle; import android.os.Bundle;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -121,10 +122,9 @@ public class ShareMenuFragment extends Fragment implements OnItemClickListener {
} }
public void dismissMenu() { public void dismissMenu() {
menu.getMapActivity().getSupportFragmentManager().popBackStackImmediate(TAG, FragmentManager.POP_BACK_STACK_INCLUSIVE);
if (menu.getMapActivity().getContextMenu().isVisible()) { if (menu.getMapActivity().getContextMenu().isVisible()) {
menu.getMapActivity().getContextMenu().hide(); menu.getMapActivity().getContextMenu().hide();
} else {
menu.getMapActivity().getSupportFragmentManager().popBackStack();
} }
} }
} }