Remove parking from favourites after clearing prefs
This commit is contained in:
parent
4e43dba7f4
commit
3dde2ab020
2 changed files with 6 additions and 3 deletions
|
@ -132,6 +132,10 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
|||
parkingEvent.resetToDefault();
|
||||
parkingStartTime.resetToDefault();
|
||||
parkingPosition = null;
|
||||
FavouritePoint pnt = app.getFavorites().getSpecialPoint(SpecialPointType.PARKING);
|
||||
if (pnt != null) {
|
||||
app.getFavorites().deleteFavourite(pnt);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -372,7 +376,6 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
|||
} else {
|
||||
addOrRemoveParkingEvent(false);
|
||||
}
|
||||
app.getFavorites().setSpecialPoint(getParkingPosition(), SpecialPointType.PARKING, null);
|
||||
showContextMenuIfNeeded(mapActivity, false);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -72,10 +72,10 @@ public class ParkingTypeBottomSheetDialogFragment extends MenuBottomSheetDialogF
|
|||
plugin.setParkingPosition(latitude, longitude, false);
|
||||
plugin.showContextMenuIfNeeded(mapActivity, true);
|
||||
|
||||
mapActivity.getMyApplication().getFavorites().setSpecialPoint(
|
||||
plugin.getParkingPosition(), SpecialPointType.PARKING, null);
|
||||
mapActivity.refreshMap();
|
||||
}
|
||||
mapActivity.getMyApplication().getFavorites().setSpecialPoint(
|
||||
plugin.getParkingPosition(), SpecialPointType.PARKING, null);
|
||||
}
|
||||
dismiss();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue