Skip to content

Commit

Permalink
[Fix] Delegate main
Browse files Browse the repository at this point in the history
  • Loading branch information
sonder-joker committed Jan 15, 2022
1 parent e3e2867 commit b1b31eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/src/main/kotlin/EntryPoint.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ import java.util.concurrent.Executors

private val ConsoleThread = Executors.newSingleThreadExecutor().asCoroutineDispatcher()

fun main(extraAction: () -> Unit) = application {
fun main() {
startApplication {}
}

fun startApplication(extraAction: () -> Unit) = application {
val scope = rememberCoroutineScope()
MaterialTheme(colors = color) {
MiraiComposeWindow(onLoaded = {
Expand Down
2 changes: 1 addition & 1 deletion app/src/test/kotlin/Entrypoint.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class EntrypointTest{

@Test
fun start() {
main {
startApplication {
TestPlugin.load()
TestPlugin.enable()
}
Expand Down

0 comments on commit b1b31eb

Please sign in to comment.