- private final static ArrivalsFetcher[] defaultFetchers = new ArrivalsFetcher[]{new FiveTAPIFetcher(), new GTTJSONFetcher(), new FiveTScraperFetcher()};
static final String STOP_TITLE = "messageExtra";
private @Nullable String stopID,stopName;
@@ -85,7 +85,7 @@
protected ImageButton addToFavorites;
protected TextView timesSourceTextView;
- private List<ArrivalsFetcher> fetchers = new ArrayList<>(Arrays.asList(defaultFetchers));
+ private List<ArrivalsFetcher> fetchers = new ArrayList<>(Arrays.asList(utils.getDefaultArrivalsFetchers()));
private boolean reloadOnResume = true;
@@ -324,14 +324,18 @@
case FiveTScraper:
source_txt = getString(R.string.fivetscraper);
break;
+ case MatoAPI:
+ source_txt = getString(R.string.source_mato);
+ break;
case UNDETERMINED:
//Don't show the view
- timesSourceTextView.setVisibility(View.GONE);
- return;
+ source_txt = "";
+ break;
default:
throw new IllegalStateException("Unexpected value: " + source);
}
int count = 0;
+ if (source!= Passaggio.Source.UNDETERMINED)
while (source != fetchers.get(0).getSourceForFetcher() && count < 100){