move method "isInternetAvailable" from TravelDownloadUpdate card to BaseTravelCard

This commit is contained in:
Alex Sytnyk 2018-05-07 12:31:59 +03:00
parent 57c5b87a89
commit c395b380c1
2 changed files with 4 additions and 4 deletions

View file

@ -45,4 +45,8 @@ public abstract class BaseTravelCard {
protected Drawable getColoredIcon(@DrawableRes int icon, @ColorRes int color) {
return app.getIconsCache().getIcon(icon, color);
}
protected boolean isInternetAvailable() {
return app.getSettings().isInternetConnectionAvailable();
}
}

View file

@ -109,10 +109,6 @@ public class TravelDownloadUpdateCard extends BaseTravelCard {
return app.getString(download ? R.string.download_file : R.string.update_is_available);
}
private boolean isInternetAvailable() {
return app.getSettings().isInternetConnectionAvailable();
}
private Drawable getIcon() {
int id = download ? R.drawable.travel_card_download_icon : R.drawable.travel_card_update_icon;
return ContextCompat.getDrawable(app, id);