mirror of
https://github.com/ChronosX88/Influence-P2P.git
synced 2024-11-22 07:12:19 +00:00
Made preventing sending an empty message
This commit is contained in:
parent
beec4cf4e2
commit
07285c4845
@ -50,6 +50,9 @@ public class ChatActivity extends AppCompatActivity implements IChatViewContract
|
||||
messageTextEdit = findViewById(R.id.message_input);
|
||||
sendMessageButton = findViewById(R.id.send_button);
|
||||
sendMessageButton.setOnClickListener((v) -> {
|
||||
if(messageTextEdit.getText().toString().equals("")) {
|
||||
return;
|
||||
}
|
||||
presenter.sendMessage(messageTextEdit.getText().toString());
|
||||
messageTextEdit.setText("");
|
||||
messageList.scrollToPosition(chatAdapter.getItemCount()-1);
|
||||
|
Loading…
Reference in New Issue
Block a user