mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 04:51:50 +01:00
Lazily instantiate Cloudflare client
This commit is contained in:
parent
a5339969c9
commit
b3f5f13c39
@ -61,8 +61,10 @@ class NetworkHelper(context: Context) {
|
|||||||
builder.build()
|
builder.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
val cloudflareClient = client.newBuilder()
|
val cloudflareClient by lazy {
|
||||||
|
client.newBuilder()
|
||||||
.addInterceptor(UserAgentInterceptor())
|
.addInterceptor(UserAgentInterceptor())
|
||||||
.addInterceptor(CloudflareInterceptor(context))
|
.addInterceptor(CloudflareInterceptor(context))
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user