Don't show points if there are no points

This commit is contained in:
Victor Shcherb 2018-05-30 14:53:53 +02:00
parent 29fc632a7c
commit 20727b0e16

View file

@ -303,7 +303,10 @@ public class WikivoyageArticleDialogFragment extends WikiArticleBaseDialogFragme
webViewClient.setArticle(article); webViewClient.setArticle(article);
articleToolbarText.setText(article.getTitle()); articleToolbarText.setText(article.getTitle());
if (article.getGpxFile() != null && article.getGpxFile().getPointsSize() > 0) { if (article.getGpxFile() != null && article.getGpxFile().getPointsSize() > 0) {
trackButton.setVisibility(View.VISIBLE);
trackButton.setText(getString(R.string.shared_string_gpx_points) + " (" + article.getGpxFile().getPointsSize() + ")"); trackButton.setText(getString(R.string.shared_string_gpx_points) + " (" + article.getGpxFile().getPointsSize() + ")");
} else {
trackButton.setVisibility(View.GONE);
} }
TravelLocalDataHelper ldh = getMyApplication().getTravelDbHelper().getLocalDataHelper(); TravelLocalDataHelper ldh = getMyApplication().getTravelDbHelper().getLocalDataHelper();