shortening some Picasso initialization code

This commit is contained in:
tibbi 2021-03-30 15:16:41 +02:00
parent ed7c834222
commit d068135a39

View file

@ -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() {
@ -13,13 +14,9 @@ class App : Application() {
checkUseEnglish()
Reprint.initialize(this)
Picasso.setSingletonInstance(Picasso.Builder(this).downloader(object : Downloader {
override fun load(request: okhttp3.Request): Response {
return Response.Builder().build()
}
override fun load(request: Request) = Response.Builder().build()
override fun shutdown() {
}
override fun shutdown() {}
}).build())
}
}