diff --git a/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/controller/MiraiGraphicalUIController.kt b/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/controller/MiraiGraphicalUIController.kt index f5e34b04d..c7cd8d082 100644 --- a/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/controller/MiraiGraphicalUIController.kt +++ b/mirai-console-graphical/src/main/kotlin/net/mamoe/mirai/console/graphical/controller/MiraiGraphicalUIController.kt @@ -49,14 +49,16 @@ class MiraiGraphicalUIController : Controller(), MiraiConsoleUI { } } - when (identity) { - 0L -> mainLog.apply { - add("$identityStr $message") - mainLog.trim() - } - else -> cache[identity]?.logHistory?.apply { - add("$identityStr $message") - trim() + Platform.runLater { + when (identity) { + 0L -> mainLog.apply { + add("$identityStr $message") + trim() + } + else -> cache[identity]?.logHistory?.apply { + add("$identityStr $message") + trim() + } } } }