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.delay
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.first
|
||||
import kotlinx.coroutines.flow.flow
|
||||
import kotlinx.coroutines.flow.flowOn
|
||||
import kotlinx.coroutines.flow.take
|
||||
import kotlinx.datetime.Clock
|
||||
import kotlinx.serialization.Serializable
|
||||
import kotlinx.serialization.SerializationException
|
||||
|
@ -120,7 +122,7 @@ class Client private constructor(
|
|||
val client = this.httpClient1Min
|
||||
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)
|
||||
setBody(
|
||||
getJSONRequestBody("appInit", request)
|
||||
|
@ -132,7 +134,7 @@ class Client private constructor(
|
|||
}.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
|
||||
return flow<Result4k<AppInitResponse, APIError>> {
|
||||
|
||||
|
@ -147,5 +149,5 @@ class Client private constructor(
|
|||
|
||||
}.flowOn(Dispatchers.IO)
|
||||
|
||||
}
|
||||
}*/
|
||||
}
|
|
@ -23,6 +23,7 @@ import androidx.compose.ui.platform.LocalUriHandler
|
|||
import ru.nm17.narodmon.R
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun AgreementDialog(modifier: Modifier = Modifier, onClick: () -> Unit) {
|
||||
val uriHandler = LocalUriHandler.current
|
||||
|
|
|
@ -60,7 +60,7 @@ fun GenericNavScaffold(title: @Composable () -> Unit, content: @Composable (Padd
|
|||
leadingContent = {
|
||||
Icon(Icons.Default.AccountCircle, contentDescription = "")
|
||||
},
|
||||
headlineText = { Text(text = "Гость", style = MaterialTheme.typography.titleLarge)},
|
||||
headlineContent = { Text(text = "Гость", style = MaterialTheme.typography.titleLarge)},
|
||||
modifier = Modifier.height(72.dp)
|
||||
)
|
||||
Divider()
|
||||
|
|
Loading…
Reference in a new issue