cleanup: don't test for what can't happen

This commit is contained in:
Eric House 2016-07-19 17:35:20 -07:00
parent d6ffd4dc25
commit 2b58072524

View file

@ -188,16 +188,11 @@ public class ChatDelegate extends DelegateBase {
private void handleSend() { private void handleSend() {
String text = m_edit.getText().toString(); String text = m_edit.getText().toString();
if ( null == text || text.length() == 0 ) { DBUtils.appendChatHistory( m_activity, m_rowid, text, m_curPlayer );
setResult( Activity.RESULT_CANCELED ); addRow( text, m_curPlayer );
finish(); m_edit.setText( null );
} else {
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 @Override