Update the project to a modern state

This commit is contained in:
Alexander Nozik 2024-04-28 19:18:06 +03:00
parent 871e70222d
commit 31a9231bb8
2 changed files with 3 additions and 5 deletions

View File

@ -57,8 +57,8 @@ suspend fun main() {
LaunchedEffect(Unit){
dataFlow.onEach { event ->
println("Received $event")
if (event is CounterDataEvent) {
count = event.value
when (event) {
is CounterDataEvent -> count = event.value
}
}.launchIn(this)
}

View File

@ -5,7 +5,6 @@ import io.ktor.server.application.call
import io.ktor.server.application.install
import io.ktor.server.engine.embeddedServer
import io.ktor.server.html.respondHtml
import io.ktor.server.http.content.resources
import io.ktor.server.http.content.staticResources
import io.ktor.server.netty.Netty
import io.ktor.server.routing.get
@ -19,7 +18,6 @@ import io.rsocket.kotlin.payload.buildPayload
import io.rsocket.kotlin.payload.data
import kotlinx.coroutines.flow.*
import kotlinx.html.*
import kotlinx.serialization.decodeFromString
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json