diff --git a/client/src/main/java/envoy/client/ui/controller/ChatScene.java b/client/src/main/java/envoy/client/ui/controller/ChatScene.java index 83e64fe..d598d4e 100644 --- a/client/src/main/java/envoy/client/ui/controller/ChatScene.java +++ b/client/src/main/java/envoy/client/ui/controller/ChatScene.java @@ -560,9 +560,14 @@ public final class ChatScene implements Restorable { private void copyAndPostMessage() { final var messageText = messageTextArea.getText(); Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(messageText), null); + final var image = attachmentView.getImage(); + final var messageAttachment = pendingAttachment; postMessage(); messageTextArea.setText(messageText); updateRemainingCharsLabel(); postButton.setDisable(messageText.isBlank()); + attachmentView.setImage(image); + if (attachmentView.getImage() != null) attachmentView.setVisible(true); + pendingAttachment = messageAttachment; } }