mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-26 06:22:17 -08:00
Merge pull request #3099 from skykatik/patch-2
Removing spaces at start and end of a message (trim)
This commit is contained in:
commit
17fd3d0bc1
1 changed files with 4 additions and 3 deletions
|
|
@ -163,15 +163,16 @@ public class ChatFragment extends Table{
|
|||
|
||||
Draw.color();
|
||||
|
||||
if(fadetime > 0 && !shown)
|
||||
if(fadetime > 0 && !shown){
|
||||
fadetime -= Time.delta / 180f;
|
||||
}
|
||||
}
|
||||
|
||||
private void sendMessage(){
|
||||
String message = chatfield.getText();
|
||||
String message = chatfield.getText().trim();
|
||||
clearChatInput();
|
||||
|
||||
if(message.replace(" ", "").isEmpty()) return;
|
||||
if(message.isEmpty()) return;
|
||||
|
||||
history.insert(1, message);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue