move method "isInternetAvailable" from TravelDownloadUpdate card to BaseTravelCard
This commit is contained in:
parent
57c5b87a89
commit
c395b380c1
2 changed files with 4 additions and 4 deletions
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue