mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
don't send 0-length message
This commit is contained in:
parent
0148a93f3e
commit
c039b92339
1 changed files with 11 additions and 8 deletions
|
@ -233,16 +233,19 @@ public class BoardActivity extends XWActivity implements UtilCtxt {
|
||||||
if ( null == m_chatMsg ) {
|
if ( null == m_chatMsg ) {
|
||||||
m_chatMsg = new EditText( this );
|
m_chatMsg = new EditText( this );
|
||||||
}
|
}
|
||||||
dialog = new AlertDialog.Builder( this )
|
lstnr = new DialogInterface.OnClickListener() {
|
||||||
.setMessage( R.string.compose_chat )
|
|
||||||
.setPositiveButton(R.string.button_send,
|
|
||||||
new DialogInterface.OnClickListener() {
|
|
||||||
public void onClick( DialogInterface dlg,
|
public void onClick( DialogInterface dlg,
|
||||||
int item ) {
|
int item ) {
|
||||||
m_jniThread.handle( JNICmd.CMD_SENDCHAT,
|
String msg = m_chatMsg.getText().toString();
|
||||||
m_chatMsg.getText().toString() );
|
if ( msg.length() > 0 ) {
|
||||||
|
m_jniThread.handle( JNICmd.CMD_SENDCHAT, msg );
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
dialog = new AlertDialog.Builder( this )
|
||||||
|
.setMessage( R.string.compose_chat )
|
||||||
|
.setPositiveButton(R.string.button_send, lstnr )
|
||||||
.setNegativeButton( R.string.button_cancel, null )
|
.setNegativeButton( R.string.button_cancel, null )
|
||||||
.setView( m_chatMsg )
|
.setView( m_chatMsg )
|
||||||
.create();
|
.create();
|
||||||
|
|
Loading…
Add table
Reference in a new issue