fix: исправил недо-мерж
This commit is contained in:
parent
bc73528681
commit
06bd65c4e4
3 changed files with 7 additions and 4 deletions
|
@ -16,8 +16,10 @@ import io.ktor.http.headers
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.flow.Flow
|
import kotlinx.coroutines.flow.Flow
|
||||||
|
import kotlinx.coroutines.flow.first
|
||||||
import kotlinx.coroutines.flow.flow
|
import kotlinx.coroutines.flow.flow
|
||||||
import kotlinx.coroutines.flow.flowOn
|
import kotlinx.coroutines.flow.flowOn
|
||||||
|
import kotlinx.coroutines.flow.take
|
||||||
import kotlinx.datetime.Clock
|
import kotlinx.datetime.Clock
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import kotlinx.serialization.SerializationException
|
import kotlinx.serialization.SerializationException
|
||||||
|
@ -120,7 +122,7 @@ class Client private constructor(
|
||||||
val client = this.httpClient1Min
|
val client = this.httpClient1Min
|
||||||
return flow<Result4k<AppInitResponse, APIError>> {
|
return flow<Result4k<AppInitResponse, APIError>> {
|
||||||
|
|
||||||
val resp = client.post("https://narodmon.ru/api") {
|
val resp = this@Client.httpClient1Min.take(1).first().post("https://narodmon.ru/api") {
|
||||||
contentType(ContentType.Application.Json)
|
contentType(ContentType.Application.Json)
|
||||||
setBody(
|
setBody(
|
||||||
getJSONRequestBody("appInit", request)
|
getJSONRequestBody("appInit", request)
|
||||||
|
@ -132,7 +134,7 @@ class Client private constructor(
|
||||||
}.flowOn(Dispatchers.IO)
|
}.flowOn(Dispatchers.IO)
|
||||||
|
|
||||||
}
|
}
|
||||||
public fun appInit(request: AppInitRequest): Flow<Result4k<AppInitResponse, APIError>> {
|
/*public fun jjhgjhg(request: AppInitRequest): Flow<Result4k<AppInitResponse, APIError>> {
|
||||||
val client = this.httpClient1Min
|
val client = this.httpClient1Min
|
||||||
return flow<Result4k<AppInitResponse, APIError>> {
|
return flow<Result4k<AppInitResponse, APIError>> {
|
||||||
|
|
||||||
|
@ -147,5 +149,5 @@ class Client private constructor(
|
||||||
|
|
||||||
}.flowOn(Dispatchers.IO)
|
}.flowOn(Dispatchers.IO)
|
||||||
|
|
||||||
}
|
}*/
|
||||||
}
|
}
|
|
@ -23,6 +23,7 @@ import androidx.compose.ui.platform.LocalUriHandler
|
||||||
import ru.nm17.narodmon.R
|
import ru.nm17.narodmon.R
|
||||||
import kotlin.system.exitProcess
|
import kotlin.system.exitProcess
|
||||||
|
|
||||||
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun AgreementDialog(modifier: Modifier = Modifier, onClick: () -> Unit) {
|
fun AgreementDialog(modifier: Modifier = Modifier, onClick: () -> Unit) {
|
||||||
val uriHandler = LocalUriHandler.current
|
val uriHandler = LocalUriHandler.current
|
||||||
|
|
|
@ -60,7 +60,7 @@ fun GenericNavScaffold(title: @Composable () -> Unit, content: @Composable (Padd
|
||||||
leadingContent = {
|
leadingContent = {
|
||||||
Icon(Icons.Default.AccountCircle, contentDescription = "")
|
Icon(Icons.Default.AccountCircle, contentDescription = "")
|
||||||
},
|
},
|
||||||
headlineText = { Text(text = "Гость", style = MaterialTheme.typography.titleLarge)},
|
headlineContent = { Text(text = "Гость", style = MaterialTheme.typography.titleLarge)},
|
||||||
modifier = Modifier.height(72.dp)
|
modifier = Modifier.height(72.dp)
|
||||||
)
|
)
|
||||||
Divider()
|
Divider()
|
||||||
|
|
Loading…
Add table
Reference in a new issue