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