fix: исправил недо-мерж

This commit is contained in:
nm17 2023-06-05 22:50:01 +04:00
parent bc73528681
commit 06bd65c4e4
Signed by: nm17
GPG key ID: 3303B70C59145CD4
3 changed files with 7 additions and 4 deletions

View file

@ -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)
} }*/
} }

View file

@ -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

View file

@ -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()