Fix #24 init koin only once

This commit is contained in:
Marc Reichelt 2020-12-15 15:42:01 +01:00
parent eb97754ff9
commit 1c85a08a5d

View file

@ -1,11 +1,15 @@
import androidx.compose.animation.animate
import androidx.compose.desktop.Window
import androidx.compose.foundation.lazy.LazyColumnFor
import androidx.compose.material.*
import androidx.compose.material.Text
import androidx.compose.runtime.*
import androidx.compose.foundation.*
import androidx.compose.foundation.Image
import androidx.compose.foundation.ScrollableColumn
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumnFor
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Scaffold
import androidx.compose.material.Text
import androidx.compose.material.TopAppBar
import androidx.compose.runtime.*
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
@ -23,17 +27,16 @@ import org.jetbrains.skija.Image
import java.awt.image.BufferedImage
import java.io.ByteArrayOutputStream
import java.io.InputStream
import java.lang.Exception
import java.net.HttpURLConnection
import java.net.URL
import javax.imageio.ImageIO
private val koin = initKoin(enableNetworkLogs = true).koin
fun main() = Window {
var peopleState by remember { mutableStateOf(emptyList<Assignment>()) }
var selectedPerson by remember { mutableStateOf("") }
val koin = initKoin(enableNetworkLogs = true).koin
val peopleInSpaceApi = koin.get<PeopleInSpaceApi>()
LaunchedEffect(true) {