mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Merge pull request #552 from vector-im/feature/bma/lazyOkHttp
Lazy use the OkHttpClient.
This commit is contained in:
+1
-1
@@ -32,6 +32,6 @@ class RetrofitFactory @Inject constructor(
|
|||||||
fun create(baseUrl: String): Retrofit = Retrofit.Builder()
|
fun create(baseUrl: String): Retrofit = Retrofit.Builder()
|
||||||
.baseUrl(baseUrl.ensureTrailingSlash())
|
.baseUrl(baseUrl.ensureTrailingSlash())
|
||||||
.addConverterFactory(json.get().asConverterFactory("application/json".toMediaType()))
|
.addConverterFactory(json.get().asConverterFactory("application/json".toMediaType()))
|
||||||
.callFactory(okHttpClient.get())
|
.callFactory { request -> okHttpClient.get().newCall(request) }
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user