mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-04 08:25:06 -05:00
Ignore empty messages entered
This commit is contained in:
parent
e0284da95f
commit
ec85ac51b7
@ -232,7 +232,7 @@ public class ServerActivity extends Activity implements ServiceConnection, Chann
|
|||||||
MessageListAdapter adapter = view.getAdapter();
|
MessageListAdapter adapter = view.getAdapter();
|
||||||
adapter.addMessage(message);
|
adapter.addMessage(message);
|
||||||
} else {
|
} else {
|
||||||
Log.d(TAG, "MessageListView Adapter is null");
|
Log.d(TAG, "MessageListView Adapter is null (position: " + position + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -320,6 +320,11 @@ public class ServerActivity extends Activity implements ServiceConnection, Chann
|
|||||||
String text = input.getText().toString();
|
String text = input.getText().toString();
|
||||||
input.setText("");
|
input.setText("");
|
||||||
|
|
||||||
|
if (text == "") {
|
||||||
|
// ignore empty messages
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
Conversation conversation = deckAdapter.getItem(deck.getSelectedItemPosition());
|
Conversation conversation = deckAdapter.getItem(deck.getSelectedItemPosition());
|
||||||
|
|
||||||
if (conversation != null) {
|
if (conversation != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user