Fix condition for posting messages
This commit is contained in:
parent
64f796107d
commit
4c79141e29
@ -137,8 +137,10 @@ public final class ChatSceneController {
|
|||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private void messageTextUpdated(KeyEvent e) {
|
private void messageTextUpdated(KeyEvent e) {
|
||||||
if (settings.isEnterToSend() && e.getCode() == KeyCode.ENTER || !settings.isEnterToSend() && e.getCode() == KeyCode.CONTROL) postMessage();
|
if (!postButton.isDisabled() && settings.isEnterToSend() && e.getCode() == KeyCode.ENTER
|
||||||
else postButton.setDisable(messageTextArea.getText().isBlank());
|
|| !settings.isEnterToSend() && e.getCode() == KeyCode.CONTROL)
|
||||||
|
postMessage();
|
||||||
|
else postButton.setDisable(messageTextArea.getText().isBlank() || currentChat == null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user