Coil3: Use newBuilder, see https://coil-kt.github.io/coil/network/#using-a-custom-okhttpclient
This commit is contained in:
parent
79881ed004
commit
299f2fbc4e
1 changed files with 6 additions and 6 deletions
|
|
@ -31,13 +31,13 @@ class DefaultLoggedInImageLoaderFactory @Inject constructor(
|
|||
private val okHttpClient: Provider<OkHttpClient>,
|
||||
) : LoggedInImageLoaderFactory {
|
||||
override fun newImageLoader(matrixClient: MatrixClient): ImageLoader {
|
||||
return ImageLoader
|
||||
.Builder(context)
|
||||
return ImageLoader.Builder(context)
|
||||
.components {
|
||||
add(
|
||||
OkHttpNetworkFetcherFactory(
|
||||
callFactory = {
|
||||
okHttpClient.get()
|
||||
// Use newBuilder, see https://coil-kt.github.io/coil/network/#using-a-custom-okhttpclient
|
||||
okHttpClient.get().newBuilder().build()
|
||||
}
|
||||
)
|
||||
)
|
||||
|
|
@ -61,13 +61,13 @@ class NotLoggedInImageLoaderFactory @Inject constructor(
|
|||
private val okHttpClient: Provider<OkHttpClient>,
|
||||
) {
|
||||
fun newImageLoader(): ImageLoader {
|
||||
return ImageLoader
|
||||
.Builder(context)
|
||||
return ImageLoader.Builder(context)
|
||||
.components {
|
||||
add(
|
||||
OkHttpNetworkFetcherFactory(
|
||||
callFactory = {
|
||||
okHttpClient.get()
|
||||
// Use newBuilder, see https://coil-kt.github.io/coil/network/#using-a-custom-okhttpclient
|
||||
okHttpClient.get().newBuilder().build()
|
||||
}
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue