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

View file

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

View file

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