Merge pull request #3099 from skykatik/patch-2
Removing spaces at start and end of a message (trim)
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user