This commit is contained in:
cepprice 2021-01-27 10:43:34 +05:00
parent 92217cba9f
commit 3afd8fc3bd
2 changed files with 8 additions and 2 deletions

View file

@ -12,6 +12,7 @@
-->
<string name="toast_select_edits_for_upload">Select edits for upload</string>
<string name="copy_to_map_favorites">Copy to favorites</string>
<string name="copy_to_map_markers">Copy to map markers</string>
<string name="delete_waypoints">Delete waypoints</string>

View file

@ -295,8 +295,13 @@ public class OsmEditsFragment extends OsmAndListFragment implements ProgressDial
item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
uploadItems(osmEditsSelected.toArray(new OsmPoint[0]));
mode.finish();
if (Algorithms.isEmpty(osmEditsSelected)) {
Toast.makeText(requireContext(),
R.string.toast_select_edits_for_upload, Toast.LENGTH_LONG).show();
} else {
uploadItems(osmEditsSelected.toArray(new OsmPoint[0]));
mode.finish();
}
return true;
}
});