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() {
 | 
						private void copyAndPostMessage() {
 | 
				
			||||||
		final var messageText = messageTextArea.getText();
 | 
							final var messageText = messageTextArea.getText();
 | 
				
			||||||
		Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(messageText), null);
 | 
							Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(messageText), null);
 | 
				
			||||||
 | 
							final var	image				= attachmentView.getImage();
 | 
				
			||||||
 | 
							final var	messageAttachment	= pendingAttachment;
 | 
				
			||||||
		postMessage();
 | 
							postMessage();
 | 
				
			||||||
		messageTextArea.setText(messageText);
 | 
							messageTextArea.setText(messageText);
 | 
				
			||||||
		updateRemainingCharsLabel();
 | 
							updateRemainingCharsLabel();
 | 
				
			||||||
		postButton.setDisable(messageText.isBlank());
 | 
							postButton.setDisable(messageText.isBlank());
 | 
				
			||||||
 | 
							attachmentView.setImage(image);
 | 
				
			||||||
 | 
							if (attachmentView.getImage() != null) attachmentView.setVisible(true);
 | 
				
			||||||
 | 
							pendingAttachment = messageAttachment;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user