diff --git a/app/src/main/java/io/nekohasekai/sfa/ui/main/LogFragment.kt b/app/src/main/java/io/nekohasekai/sfa/ui/main/LogFragment.kt index 7c5230e..2ae6da0 100644 --- a/app/src/main/java/io/nekohasekai/sfa/ui/main/LogFragment.kt +++ b/app/src/main/java/io/nekohasekai/sfa/ui/main/LogFragment.kt @@ -139,12 +139,12 @@ class LogFragment : Fragment(), CommandClient.Handler { lifecycleScope.launch(Dispatchers.Main) { val messageLen = messageList.size val removeLen = logList.size + messageLen - 300 + logList.addAll(messageList) if (removeLen > 0) { repeat(removeLen) { logList.removeFirst() } } - logList.addAll(messageList) updateViews(removeLen, messageLen) } }