mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-19 18:21:45 +02:00
Makes the root okhttp client for an Empty manager a lazy property to allow loading in Preview screens
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user