Makes the root okhttp client for an Empty manager a lazy property to allow loading in Preview screens

This commit is contained in:
Vitor Pamplona
2025-09-11 11:07:00 -04:00
parent 2eda4d40e8
commit 5127907acd

View File

@@ -82,12 +82,13 @@ class DualHttpClientManager(
} }
object EmptyHttpClientManager : IHttpClientManager { object EmptyHttpClientManager : IHttpClientManager {
val rootOkHttpClient = val rootOkHttpClient by lazy {
OkHttpClient OkHttpClient
.Builder() .Builder()
.followRedirects(true) .followRedirects(true)
.followSslRedirects(true) .followSslRedirects(true)
.build() .build()
}
override fun getHttpClient(useProxy: Boolean) = rootOkHttpClient override fun getHttpClient(useProxy: Boolean) = rootOkHttpClient