Merge pull request #10479 from osmandapp/fixoneinter

One inter
This commit is contained in:
Vitaliy 2020-12-28 14:20:46 +02:00 committed by GitHub
commit d7d5ea7ee7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -502,27 +502,26 @@ public class WaypointDialogHelper {
.create();
items.add(reorderStartAndFinishItem);
BaseBottomSheetItem reorderAllItems = new SimpleBottomSheetItem.Builder()
.setIcon(getContentIcon(R.drawable.ic_action_sort_reverse_order))
.setTitle(getString(R.string.reverse_all_points))
.setLayoutId(R.layout.bottom_sheet_item_simple)
.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
WaypointDialogHelper.reverseAllPoints(
app,
mapActivity,
mapActivity.getDashboard().getWaypointDialogHelper()
);
if (!Algorithms.isEmpty(targetsHelper.getIntermediatePoints())) {
BaseBottomSheetItem reorderAllItems = new SimpleBottomSheetItem.Builder()
.setIcon(getContentIcon(R.drawable.ic_action_sort_reverse_order))
.setTitle(getString(R.string.reverse_all_points))
.setLayoutId(R.layout.bottom_sheet_item_simple)
.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
MapActivity mapActivity = getMapActivity();
if (mapActivity != null) {
WaypointDialogHelper.reverseAllPoints(
app,
mapActivity,
mapActivity.getDashboard().getWaypointDialogHelper()
);
}
dismiss();
}
dismiss();
}
})
.create();
int intermediateSize = targetsHelper.getIntermediatePoints().size();
if (intermediateSize > 1) {
})
.create();
items.add(reorderAllItems);
}