mirror of
https://github.com/ChronosX88/Influence-P2P.git
synced 2024-11-25 16:32: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);
|
messageTextEdit = findViewById(R.id.message_input);
|
||||||
sendMessageButton = findViewById(R.id.send_button);
|
sendMessageButton = findViewById(R.id.send_button);
|
||||||
sendMessageButton.setOnClickListener((v) -> {
|
sendMessageButton.setOnClickListener((v) -> {
|
||||||
|
if(messageTextEdit.getText().toString().equals("")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
presenter.sendMessage(messageTextEdit.getText().toString());
|
presenter.sendMessage(messageTextEdit.getText().toString());
|
||||||
messageTextEdit.setText("");
|
messageTextEdit.setText("");
|
||||||
messageList.scrollToPosition(chatAdapter.getItemCount()-1);
|
messageList.scrollToPosition(chatAdapter.getItemCount()-1);
|
||||||
|
Loading…
Reference in New Issue
Block a user