package de.apps4ics.mountainnavigation;
import android.content.Context;
import android.util.Log;
import java.util.Date;
import java.util.List;
/**
* Created by Vinz on 18.03.2016.
*/
public class OnWeatherRetrievedCallback implements OnWeatherRetrieved {
Context context;
public OnWeatherRetrievedCallback(Context context) {
this.context = context;
}
@Override
public List<MyWeather> postRetrieve(List<MyWeather> weathers) {
if(weathers.size() == 0) {
MainActivity.Toaster("No forecasts found for this location!", context);
} else {
MainActivity.Toaster(weathers.size() + " forecasts found and added!", context);
}
for(MyWeather mw : weathers) {
Log.d(MainActivity.TAG, mw.getCity() + " (" + MainActivity.df_full.format(new Date(mw.getTimestamp()*1000)) + ")");
}
return null;
}
}