diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java index e1ffdc77a3..43cc3b2840 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreRvAdapter.java @@ -143,6 +143,14 @@ public class ExploreRvAdapter extends RecyclerView.Adapter position && items.get(position).getCardType() == TravelNeededMapsCard.TYPE; + } + public void setDownloadUpdateCard(TravelDownloadUpdateCard card) { if (addItem(getDownloadUpdateCardPosition(), card)) { notifyDataSetChanged(); diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java index 7dc4547ce4..1994044280 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/explore/ExploreTabFragment.java @@ -231,7 +231,7 @@ public class ExploreTabFragment extends BaseOsmAndFragment implements DownloadIn if (neededMapsCard.isDownloading()) { Toast.makeText(getContext(), "Cancel", Toast.LENGTH_SHORT).show(); } else { - Toast.makeText(getContext(), "Later", Toast.LENGTH_SHORT).show(); + removeNeededMapsCard(); } } }); @@ -250,6 +250,11 @@ public class ExploreTabFragment extends BaseOsmAndFragment implements DownloadIn downloadUpdateCard = null; } + private void removeNeededMapsCard() { + adapter.removeNeededMapsCard(); + neededMapsCard = null; + } + private static class ProcessIndexItemsTask extends AsyncTask>> { private static DownloadActivityType[] types = new DownloadActivityType[]{