From 90b903a1d0a1ffca219c8694299532dd470af07c Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Sat, 22 Apr 2017 13:29:00 +0800 Subject: [PATCH] Let OkHttp3Downloader create an OkHttpClient by default This re-enables the local cache in default cache directory --- .../main/java/com/keylesspalace/tusky/TuskyApplication.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/TuskyApplication.java b/app/src/main/java/com/keylesspalace/tusky/TuskyApplication.java index 947b8ffe..6fc59398 100644 --- a/app/src/main/java/com/keylesspalace/tusky/TuskyApplication.java +++ b/app/src/main/java/com/keylesspalace/tusky/TuskyApplication.java @@ -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