Add comment for Retrofit async OkHttp

Change-Id: Ic7a6887b76caf26f00b58b0753271d426b67e75b
pull/1190/head
Tomáš Mlynarič 11 months ago
parent d110d92b87
commit 4cdc2ad345

@ -80,6 +80,8 @@ internal class RetrofitNiaNetwork @Inject constructor(
private val networkApi = trace("RetrofitNiaNetwork") {
Retrofit.Builder()
.baseUrl(NIA_BASE_URL)
// We use callFactory lambda here with dagger.Lazy<Call.Factory>
// to prevent initializing OkHttp on the main thread.
.callFactory { okhttpCallFactory.get().newCall(it) }
.addConverterFactory(
networkJson.asConverterFactory("application/json".toMediaType()),

Loading…
Cancel
Save