remove "Show more" button when all travel files deleted.
This commit is contained in:
parent
c54e4d7a38
commit
233a4ba3d7
1 changed files with 23 additions and 20 deletions
|
@ -186,7 +186,7 @@ public class ExploreTabFragment extends BaseOsmAndFragment implements DownloadEv
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (app.getTravelHelper().isAnyTravelBookPresent()) {
|
||||||
TravelButtonCard travelButtonCard = new TravelButtonCard(app, nightMode);
|
TravelButtonCard travelButtonCard = new TravelButtonCard(app, nightMode);
|
||||||
travelButtonCard.setListener(new TravelNeededMapsCard.CardListener() {
|
travelButtonCard.setListener(new TravelNeededMapsCard.CardListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -207,7 +207,7 @@ public class ExploreTabFragment extends BaseOsmAndFragment implements DownloadEv
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
items.add(travelButtonCard);
|
items.add(travelButtonCard);
|
||||||
|
}
|
||||||
items.add(new StartEditingTravelCard(activity, nightMode));
|
items.add(new StartEditingTravelCard(activity, nightMode));
|
||||||
adapter.setItems(items);
|
adapter.setItems(items);
|
||||||
final DownloadIndexesThread downloadThread = app.getDownloadThread();
|
final DownloadIndexesThread downloadThread = app.getDownloadThread();
|
||||||
|
@ -248,11 +248,14 @@ public class ExploreTabFragment extends BaseOsmAndFragment implements DownloadEv
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addIndexItemCards(List<IndexItem> mainIndexItem, List<IndexItem> neededIndexItems) {
|
private void addIndexItemCards(List<IndexItem> mainIndexItem, List<IndexItem> neededIndexItems) {
|
||||||
|
final OsmandApplication app = getMyApplication();
|
||||||
|
if (app != null && !app.getTravelHelper().isAnyTravelBookPresent()) {
|
||||||
this.mainIndexItems.clear();
|
this.mainIndexItems.clear();
|
||||||
this.mainIndexItems.addAll(mainIndexItem);
|
this.mainIndexItems.addAll(mainIndexItem);
|
||||||
|
addDownloadUpdateCard();
|
||||||
|
}
|
||||||
this.neededIndexItems.clear();
|
this.neededIndexItems.clear();
|
||||||
this.neededIndexItems.addAll(neededIndexItems);
|
this.neededIndexItems.addAll(neededIndexItems);
|
||||||
addDownloadUpdateCard();
|
|
||||||
addNeededMapsCard();
|
addNeededMapsCard();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue