Fixed bug not copying attachment when using copy and send
This commit is contained in:
		@@ -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;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user