Changeset View
Changeset View
Standalone View
Standalone View
src/it/reyboz/bustorino/fragments/ArrivalsFragment.java
Show First 20 Lines • Show All 369 Lines • ▼ Show 20 Lines | protected boolean adjustFetchersToSource(Passaggio.Source source){ | ||||
int count = 0; | int count = 0; | ||||
if (source!= Passaggio.Source.UNDETERMINED) | if (source!= Passaggio.Source.UNDETERMINED) | ||||
while (source != fetchers.get(0).getSourceForFetcher() && count < 200){ | while (source != fetchers.get(0).getSourceForFetcher() && count < 200){ | ||||
//we need to update the fetcher that is requested | //we need to update the fetcher that is requested | ||||
rotateFetchers(); | rotateFetchers(); | ||||
count++; | count++; | ||||
} | } | ||||
return count < 200; | return count < 200; | ||||
} | } | ||||
protected boolean adjustFetchersToSource(){ | protected boolean adjustFetchersToSource(){ | ||||
if (lastUpdatedPalina == null) return false; | if (lastUpdatedPalina == null) return false; | ||||
final Passaggio.Source source = lastUpdatedPalina.getPassaggiSourceIfAny(); | final Passaggio.Source source = lastUpdatedPalina.getPassaggiSourceIfAny(); | ||||
return adjustFetchersToSource(source); | return adjustFetchersToSource(source); | ||||
} | } | ||||
@Override | @Override | ||||
▲ Show 20 Lines • Show All 173 Lines • Show Last 20 Lines |
Public contents are in Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) or GNU Free Documentation License (at your option) unless otherwise noted. · Contact / Register