From 411157bada38d6585e65a9347a8f4349fc922362 Mon Sep 17 00:00:00 2001 From: "jiahua.liu" Date: Sun, 29 Mar 2020 20:37:47 +0800 Subject: [PATCH] prep for native --- .../console/graphical/MiraiConsoleGraphicalLoader.kt | 4 ++-- .../net/mamoe/mirai/console/wrapper/WrapperMain.kt | 9 +++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/MiraiConsoleGraphicalLoader.kt b/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/MiraiConsoleGraphicalLoader.kt index 06c3fc167..46c2b5454 100644 --- a/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/MiraiConsoleGraphicalLoader.kt +++ b/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/MiraiConsoleGraphicalLoader.kt @@ -16,8 +16,8 @@ import kotlin.concurrent.thread class MiraiConsoleGraphicalLoader { companion object { - internal lateinit var coreVersion :String - internal lateinit var consoleVersion: String + internal var coreVersion :String = "0.0.0" + internal var consoleVersion: String = "0.0.0" @JvmStatic fun load( coreVersion: String, diff --git a/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/WrapperMain.kt b/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/WrapperMain.kt index c8a38311d..49bbcac43 100644 --- a/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/WrapperMain.kt +++ b/mirai-console-wrapper/src/main/kotlin/net/mamoe/mirai/console/wrapper/WrapperMain.kt @@ -72,12 +72,17 @@ object WrapperMain { ConsoleUpdater.versionCheck(CONSOLE_GRAPHICAL) } } - uiLog("版本检查完成\n") + uiLog("版本检查完成, 启动中\n") runBlocking { MiraiDownloader.downloadIfNeed(true) } - start(CONSOLE_GRAPHICAL) + GlobalScope.launch { + delay(3000) + uiOpen = false + f.isVisible = false + } + start(CONSOLE_GRAPHICAL) } else { preStartInNonNative() }