mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 02:15:34 -04:00
chat history: just push if not blank
This commit is contained in:
parent
15ba52642b
commit
ba9dfa1688
@ -174,7 +174,7 @@ class ChatElement(guiRenderer: GUIRenderer) : AbstractChatElement(guiRenderer),
|
||||
val value = input.value
|
||||
input.submit()
|
||||
input.value = ""
|
||||
if (history.lastOrNull() != value) {
|
||||
if (history.lastOrNull() != value && value.isNotBlank()) {
|
||||
// ToDo: Improve history
|
||||
history += value
|
||||
}
|
||||
@ -202,6 +202,7 @@ class ChatElement(guiRenderer: GUIRenderer) : AbstractChatElement(guiRenderer),
|
||||
historyIndex--
|
||||
input.value = history[historyIndex]
|
||||
}
|
||||
|
||||
KeyCodes.KEY_DOWN -> {
|
||||
val size = history.size
|
||||
historyIndex++
|
||||
|
Loading…
x
Reference in New Issue
Block a user