From d068135a39a14380f46bbdadce1104542d0bedee Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 30 Mar 2021 15:16:41 +0200 Subject: [PATCH] shortening some Picasso initialization code --- .../kotlin/com/simplemobiletools/gallery/pro/App.kt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/App.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/App.kt index 62d2c3332..ef2768318 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/App.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/App.kt @@ -5,6 +5,7 @@ import com.github.ajalt.reprint.core.Reprint import com.simplemobiletools.commons.extensions.checkUseEnglish import com.squareup.picasso.Downloader import com.squareup.picasso.Picasso +import okhttp3.Request import okhttp3.Response class App : Application() { @@ -12,14 +13,10 @@ class App : Application() { super.onCreate() checkUseEnglish() Reprint.initialize(this) - Picasso.setSingletonInstance(Picasso.Builder(this).downloader(object: Downloader { - override fun load(request: okhttp3.Request): Response { - return Response.Builder().build() - } + Picasso.setSingletonInstance(Picasso.Builder(this).downloader(object : Downloader { + override fun load(request: Request) = Response.Builder().build() - override fun shutdown() { - - } + override fun shutdown() {} }).build()) } }