Merge branch 'develop' into f/finishing_new_UI

This commit is contained in:
2020-08-30 15:48:29 +02:00
96 changed files with 724 additions and 431 deletions

View File

@ -87,6 +87,12 @@ public final class ChatScene implements Restorable {
@FXML
private Button settingsButton;
@FXML
private Button messageSearchButton;
@FXML
private Button newGroupButton;
@FXML
private TextArea messageTextArea;
@ -108,9 +114,6 @@ public final class ChatScene implements Restorable {
@FXML
private Label topBarStatusLabel;
@FXML
private Button messageSearchButton;
@FXML
private ImageView clientProfilePic;
@ -141,7 +144,7 @@ public final class ChatScene implements Restorable {
private AudioRecorder recorder;
private boolean recording;
private Attachment pendingAttachment;
private boolean postingPermanentlyDisabled;
private boolean postingPermanentlyDisabled;
private final SystemCommandsMap messageTextAreaCommands = new SystemCommandsMap();
@ -265,6 +268,21 @@ public final class ChatScene implements Restorable {
break;
}
});
// Disable attachment button if server says attachments will be filtered out
eventBus.register(NoAttachments.class, e -> {
Platform.runLater(() -> {
attachmentButton.setDisable(true);
voiceButton.setDisable(true);
final var alert = new Alert(AlertType.ERROR);
alert.setTitle("No attachments possible");
alert.setHeaderText("Your current server does not support attachments.");
alert.setContentText("If this is unplanned, please contact your server administrator.");
alert.showAndWait();
});
});
eventBus.register(GroupCreationResult.class, e -> Platform.runLater(() -> { newGroupButton.setDisable(!e.get()); }));
}
private AnchorPane createOfflineNote() {