diff --git a/images/emoji/emoji-sheet-twitter-64.png b/images/emoji/emoji-sheet-twitter-64.png deleted file mode 100644 index 67b12dc8b..000000000 Binary files a/images/emoji/emoji-sheet-twitter-64.png and /dev/null differ diff --git a/stylesheets/_session_conversation.scss b/stylesheets/_session_conversation.scss index 51ba9b1c1..0ee4a208b 100644 --- a/stylesheets/_session_conversation.scss +++ b/stylesheets/_session_conversation.scss @@ -211,14 +211,14 @@ $composition-container-height: 60px; .send-message-input { display: flex; + align-items: center; flex-grow: 1; min-height: $composition-container-height; - padding: 16px 0px; textarea { font-family: $session-font-default; min-height: $composition-container-height / 3; - max-height: 2 * $composition-container-height; + max-height: 3 * $composition-container-height; margin-right: $session-margin-md; color: $session-color-white; resize: none; diff --git a/ts/components/session/conversation/SessionCompositionBox.tsx b/ts/components/session/conversation/SessionCompositionBox.tsx index 00bb2dbe6..9b5e2ac1e 100644 --- a/ts/components/session/conversation/SessionCompositionBox.tsx +++ b/ts/components/session/conversation/SessionCompositionBox.tsx @@ -75,6 +75,9 @@ export class SessionCompositionBox extends React.Component { this.onChoseAttachment = this.onChoseAttachment.bind(this); this.onChooseAttachment = this.onChooseAttachment.bind(this); + // On Sending + this.onSendMessage = this.onSendMessage.bind(this); + // Events this.onKeyDown = this.onKeyDown.bind(this); this.onChange = this.onChange.bind(this); @@ -177,6 +180,7 @@ export class SessionCompositionBox extends React.Component { { } private onChooseAttachment() { - const fileInput = this.fileInput.current; - if (fileInput) fileInput.click(); + this.fileInput.current?.click(); } private onChoseAttachment() { // Build attachments list const attachmentsFileList = this.fileInput.current?.files; - if (!attachmentsFileList) return; + if (!attachmentsFileList) { + return; + } const attachments: Array = []; Array.from(attachmentsFileList).forEach(async (file: File) => { @@ -371,6 +376,7 @@ export class SessionCompositionBox extends React.Component { // On drop attachments! // this.textarea.current?.ondrop; // Look into react-dropzone + // DROP AREA COMES FROM SessionConversation NOT HERE } private onChange(event: any) { @@ -406,7 +412,8 @@ export class SessionCompositionBox extends React.Component { } private onTextareaContainerClick() { - // Focus textarea when user clicks anywhere in the container - this.textarea.current?.focus(); + // Focus the textarea when user clicks anywhere in the composition box + setTimeout(() => this.textarea.current?.focus(), 50); } + }