Commit 2870b361 authored by Konstantin Tskhovrebov's avatar Konstantin Tskhovrebov 🤖

Move GlideModule into glide package.

parent 68d406b6
package ru.terrakok.gitlabclient.toothpick
package ru.terrakok.gitlabclient.glide
import android.content.Context
import com.bumptech.glide.Glide
......@@ -8,6 +8,7 @@ import com.bumptech.glide.integration.okhttp3.OkHttpUrlLoader
import com.bumptech.glide.load.model.GlideUrl
import com.bumptech.glide.module.AppGlideModule
import okhttp3.OkHttpClient
import ru.terrakok.gitlabclient.toothpick.DI
import toothpick.Toothpick
import java.io.InputStream
......@@ -17,9 +18,10 @@ import java.io.InputStream
@GlideModule
class GlideModule : AppGlideModule() {
private val okHttpClient: OkHttpClient = Toothpick
.openScope(DI.SERVER_SCOPE)
.getInstance(OkHttpClient::class.java)
private val okHttpClient: OkHttpClient =
Toothpick
.openScope(DI.SERVER_SCOPE)
.getInstance(OkHttpClient::class.java)
override fun registerComponents(context: Context, glide: Glide, registry: Registry) {
val factory = OkHttpUrlLoader.Factory(okHttpClient)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment