mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 18:40:15 +08:00
Graphical singe main thread for log
This commit is contained in:
parent
4d304ba1ac
commit
12cc30e94d
@ -49,10 +49,11 @@ class MiraiGraphicalUIController : Controller(), MiraiConsoleUI {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Platform.runLater {
|
||||||
when (identity) {
|
when (identity) {
|
||||||
0L -> mainLog.apply {
|
0L -> mainLog.apply {
|
||||||
add("$identityStr $message")
|
add("$identityStr $message")
|
||||||
mainLog.trim()
|
trim()
|
||||||
}
|
}
|
||||||
else -> cache[identity]?.logHistory?.apply {
|
else -> cache[identity]?.logHistory?.apply {
|
||||||
add("$identityStr $message")
|
add("$identityStr $message")
|
||||||
@ -60,6 +61,7 @@ class MiraiGraphicalUIController : Controller(), MiraiConsoleUI {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun prePushBot(identity: Long) = Platform.runLater {
|
override fun prePushBot(identity: Long) = Platform.runLater {
|
||||||
BotModel(identity).also {
|
BotModel(identity).also {
|
||||||
|
Loading…
Reference in New Issue
Block a user