From 598a16e71b96e10effb6473ed57e920d1112c438 Mon Sep 17 00:00:00 2001 From: serg Date: Mon, 17 Aug 2020 16:00:28 +0300 Subject: [PATCH] Fix #9582 --- .../ParkingTypeBottomSheetDialogFragment.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingTypeBottomSheetDialogFragment.java b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingTypeBottomSheetDialogFragment.java index ae819b460c..616a51cd23 100644 --- a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingTypeBottomSheetDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingTypeBottomSheetDialogFragment.java @@ -63,20 +63,21 @@ public class ParkingTypeBottomSheetDialogFragment extends MenuBottomSheetDialogF if (plugin.isParkingEventAdded()) { plugin.showDeleteEventWarning(mapActivity); } + if (limited) { plugin.setParkingPosition(latitude, longitude, true); - plugin.showSetTimeLimitDialog(mapActivity, new Dialog(getContext())); - mapActivity.refreshMap(); + plugin.showSetTimeLimitDialog(mapActivity, new Dialog(mapActivity)); } else { plugin.addOrRemoveParkingEvent(false); plugin.setParkingPosition(latitude, longitude, false); - plugin.showContextMenuIfNeeded(mapActivity, true); - - mapActivity.refreshMap(); } + mapActivity.refreshMap(); mapActivity.getMyApplication().getFavorites().setSpecialPoint( plugin.getParkingPosition(), SpecialPointType.PARKING, null); + if (!limited) { + plugin.showContextMenuIfNeeded(mapActivity, true); + } + dismiss(); } - dismiss(); } }