mirror of
https://github.com/fromchat-messenger/app.git
synced 2026-09-22 19:15:05 +03:00
Implement Liquid Glass blur and fix Websocket on physical devices
This commit is contained in:
@@ -3,11 +3,15 @@ package ru.fromchat.api
|
||||
import io.ktor.client.HttpClient
|
||||
import io.ktor.client.HttpClientConfig
|
||||
import io.ktor.client.engine.okhttp.OkHttp
|
||||
import io.ktor.client.engine.okhttp.OkHttpConfig
|
||||
import okhttp3.Dns
|
||||
|
||||
actual fun createPlatformHttpClient(
|
||||
block: HttpClientConfig<*>.() -> Unit
|
||||
): HttpClient {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
return HttpClient(OkHttp, block as HttpClientConfig<OkHttpConfig>.() -> Unit)
|
||||
actual fun createPlatformHttpClient(block: HttpClientConfig<*>.() -> Unit): HttpClient {
|
||||
return HttpClient(OkHttp) {
|
||||
engine {
|
||||
config {
|
||||
dns(Dns.SYSTEM)
|
||||
}
|
||||
}
|
||||
block()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user