mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Stop sending empty messages
Former-commit-id: 0f2ed6d0adbbf07566ae1cee1cb0c0498c0c15d8
This commit is contained in:
parent
3cc0cf8443
commit
2147774665
@ -154,13 +154,13 @@ impl Chat {
|
||||
}
|
||||
}
|
||||
|
||||
// If enter is pressed send the current message
|
||||
// If enter is pressed and the input box is not empty send the current message
|
||||
if ui_widgets
|
||||
.widget_input(self.ids.input)
|
||||
.presses()
|
||||
.key()
|
||||
.any(|key_press| match key_press.key {
|
||||
Key::Return => true,
|
||||
Key::Return if !self.input.is_empty() => true,
|
||||
_ => false,
|
||||
})
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user