bd78d8069d
OkHttp's cache initialization is blocking the UI. As per this trick: https://www.zacsweers.dev/dagger-party-tricks-deferred-okhttp-init/, it should be better to initialize OkHttp in Retrofit's `callFactory` method. This currently doesn't solve the issue with coroutines but has no downside either. Indeed, the `callFactory` SAM is called on the `Dispatcher` which initiate the call. It's often the `viewModelScope` which is using `Dispatchers.Main`. Hopefully, an update to Retrofit will solve this issue. |
||
---|---|---|
.. | ||
DnsOverHttpsProviderRFC8484.kt | ||
DnsOverHttpsRetrofitApi.kt |