mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 10:25:06 -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
|
val value = input.value
|
||||||
input.submit()
|
input.submit()
|
||||||
input.value = ""
|
input.value = ""
|
||||||
if (history.lastOrNull() != value) {
|
if (history.lastOrNull() != value && value.isNotBlank()) {
|
||||||
// ToDo: Improve history
|
// ToDo: Improve history
|
||||||
history += value
|
history += value
|
||||||
}
|
}
|
||||||
@ -202,6 +202,7 @@ class ChatElement(guiRenderer: GUIRenderer) : AbstractChatElement(guiRenderer),
|
|||||||
historyIndex--
|
historyIndex--
|
||||||
input.value = history[historyIndex]
|
input.value = history[historyIndex]
|
||||||
}
|
}
|
||||||
|
|
||||||
KeyCodes.KEY_DOWN -> {
|
KeyCodes.KEY_DOWN -> {
|
||||||
val size = history.size
|
val size = history.size
|
||||||
historyIndex++
|
historyIndex++
|
||||||
|
Loading…
x
Reference in New Issue
Block a user