Let OkHttp3Downloader create an OkHttpClient by default

This re-enables the local cache in default cache directory
This commit is contained in:
Peter Cai 2017-04-22 13:29:00 +08:00
parent b36ad24286
commit 90b903a1d0
No known key found for this signature in database
GPG key ID: 71F5FB4E4F3FD54F

View file

@ -20,14 +20,13 @@ import android.net.Uri;
import com.squareup.picasso.Picasso;
import com.jakewharton.picasso.OkHttp3Downloader;
import okhttp3.OkHttpClient;
public class TuskyApplication extends Application {
@Override
public void onCreate() {
// Initialize Picasso configuration
Picasso.Builder builder = new Picasso.Builder(this);
builder.downloader(new OkHttp3Downloader(new OkHttpClient()));
builder.downloader(new OkHttp3Downloader(this));
if (BuildConfig.DEBUG) {
builder.listener(new Picasso.Listener() {
@Override