forked from upstream-mirrors/OpenTracks
On contextual menu, only delete all if the number of tracks is greater than 1.
This commit is contained in:
@@ -765,7 +765,7 @@ public class TrackListActivity extends AbstractSendToGoogleActivity
|
|||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
return true;
|
return true;
|
||||||
case R.id.list_context_menu_delete:
|
case R.id.list_context_menu_delete:
|
||||||
boolean deleteAll = listView.getCount() == trackIds.length;
|
boolean deleteAll = trackIds.length > 1 && trackIds.length == listView.getCount();
|
||||||
DeleteTrackDialogFragment.newInstance(deleteAll, trackIds)
|
DeleteTrackDialogFragment.newInstance(deleteAll, trackIds)
|
||||||
.show(getSupportFragmentManager(), DeleteTrackDialogFragment.DELETE_TRACK_DIALOG_TAG);
|
.show(getSupportFragmentManager(), DeleteTrackDialogFragment.DELETE_TRACK_DIALOG_TAG);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user