mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
shortening some Picasso initialization code
This commit is contained in:
parent
ed7c834222
commit
d068135a39
1 changed files with 4 additions and 7 deletions
|
@ -5,6 +5,7 @@ import com.github.ajalt.reprint.core.Reprint
|
||||||
import com.simplemobiletools.commons.extensions.checkUseEnglish
|
import com.simplemobiletools.commons.extensions.checkUseEnglish
|
||||||
import com.squareup.picasso.Downloader
|
import com.squareup.picasso.Downloader
|
||||||
import com.squareup.picasso.Picasso
|
import com.squareup.picasso.Picasso
|
||||||
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
|
|
||||||
class App : Application() {
|
class App : Application() {
|
||||||
|
@ -12,14 +13,10 @@ class App : Application() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
checkUseEnglish()
|
checkUseEnglish()
|
||||||
Reprint.initialize(this)
|
Reprint.initialize(this)
|
||||||
Picasso.setSingletonInstance(Picasso.Builder(this).downloader(object: Downloader {
|
Picasso.setSingletonInstance(Picasso.Builder(this).downloader(object : Downloader {
|
||||||
override fun load(request: okhttp3.Request): Response {
|
override fun load(request: Request) = Response.Builder().build()
|
||||||
return Response.Builder().build()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun shutdown() {
|
override fun shutdown() {}
|
||||||
|
|
||||||
}
|
|
||||||
}).build())
|
}).build())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue