diff --git a/examples/todoapp/common/edit/src/commonMain/kotlin/example/todo/common/edit/ui/TodoEditUi.kt b/examples/todoapp/common/edit/src/commonMain/kotlin/example/todo/common/edit/ui/TodoEditUi.kt index 0b1e954a02..ed0c97b1e4 100644 --- a/examples/todoapp/common/edit/src/commonMain/kotlin/example/todo/common/edit/ui/TodoEditUi.kt +++ b/examples/todoapp/common/edit/src/commonMain/kotlin/example/todo/common/edit/ui/TodoEditUi.kt @@ -1,7 +1,6 @@ package example.todo.common.edit.ui import androidx.compose.foundation.Icon -import androidx.compose.foundation.Text import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer @@ -10,6 +9,7 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.width import androidx.compose.material.Checkbox import androidx.compose.material.IconButton +import androidx.compose.material.Text import androidx.compose.material.TextField import androidx.compose.material.TopAppBar import androidx.compose.material.icons.Icons diff --git a/examples/todoapp/common/main/src/commonMain/kotlin/example/todo/common/main/ui/TodoMainUi.kt b/examples/todoapp/common/main/src/commonMain/kotlin/example/todo/common/main/ui/TodoMainUi.kt index 62d693e27d..527f104100 100644 --- a/examples/todoapp/common/main/src/commonMain/kotlin/example/todo/common/main/ui/TodoMainUi.kt +++ b/examples/todoapp/common/main/src/commonMain/kotlin/example/todo/common/main/ui/TodoMainUi.kt @@ -1,6 +1,5 @@ package example.todo.common.main.ui -import androidx.compose.foundation.Text import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -17,6 +16,7 @@ import androidx.compose.material.Divider import androidx.compose.material.Icon import androidx.compose.material.IconButton import androidx.compose.material.OutlinedTextField +import androidx.compose.material.Text import androidx.compose.material.TopAppBar import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Delete diff --git a/examples/todoapp/desktop/src/jvmMain/kotlin/example/todo/desktop/Main.kt b/examples/todoapp/desktop/src/jvmMain/kotlin/example/todo/desktop/Main.kt index 7577352fb1..5969f242d6 100644 --- a/examples/todoapp/desktop/src/jvmMain/kotlin/example/todo/desktop/Main.kt +++ b/examples/todoapp/desktop/src/jvmMain/kotlin/example/todo/desktop/Main.kt @@ -1,6 +1,5 @@ package example.todo.desktop -import androidx.compose.desktop.AppWindow import androidx.compose.desktop.DesktopTheme import androidx.compose.desktop.Window import androidx.compose.foundation.layout.fillMaxSize @@ -24,17 +23,19 @@ fun main() { val lifecycle = LifecycleRegistry() lifecycle.resume() + val todoRoot = TodoRoot( + componentContext = DefaultComponentContext(lifecycle), + dependencies = object : TodoRoot.Dependencies { + override val storeFactory = DefaultStoreFactory + override val database = TodoDatabase(TodoDatabaseDriver()) + } + ) + Window("Todo") { Surface(modifier = Modifier.fillMaxSize()) { MaterialTheme { DesktopTheme { - TodoRoot( - componentContext = DefaultComponentContext(lifecycle), - dependencies = object : TodoRoot.Dependencies { - override val storeFactory = DefaultStoreFactory - override val database = TodoDatabase(TodoDatabaseDriver()) - } - ).invoke() + todoRoot() } } }