From 2b5807252471612ebd42564a709ed437f9df2757 Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 19 Jul 2016 17:35:20 -0700 Subject: [PATCH] cleanup: don't test for what can't happen --- .../src/org/eehouse/android/xw4/ChatDelegate.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/ChatDelegate.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/ChatDelegate.java index e58520bd5..7176fc97f 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/ChatDelegate.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/ChatDelegate.java @@ -188,16 +188,11 @@ public class ChatDelegate extends DelegateBase { private void handleSend() { String text = m_edit.getText().toString(); - if ( null == text || text.length() == 0 ) { - setResult( Activity.RESULT_CANCELED ); - finish(); - } else { - DBUtils.appendChatHistory( m_activity, m_rowid, text, m_curPlayer ); - addRow( text, m_curPlayer ); - m_edit.setText( null ); + DBUtils.appendChatHistory( m_activity, m_rowid, text, m_curPlayer ); + addRow( text, m_curPlayer ); + m_edit.setText( null ); - m_jniThreadRef.sendChat( text ); - } + m_jniThreadRef.sendChat( text ); } @Override