Graphical singe main thread for log

This commit is contained in:
ryoii 2020-03-29 20:21:00 +08:00
parent 4d304ba1ac
commit 12cc30e94d

View File

@ -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()
}
}
}
}