cancelMessageReply(false)} />
)}
@@ -632,57 +262,63 @@ export const InputBar = ({
/>
)}
- {!isSelfUserRemoved && !pastedFile && (
- {
- editorRef.current = lexical;
- }}
+ {!isSelfUserRemoved && !fileHandling.pastedFile && (
+ {
- if (editedMessage) {
- cancelMessageEditing(true);
- } else if (replyMessageEntity) {
- cancelMessageReply();
- }
+ inputPlaceholder={inputPlaceholder}
+ hasLocalEphemeralTimer={hasLocalEphemeralTimer}
+ showMarkdownPreview={showMarkdownPreview}
+ formatToolbar={formatToolbar}
+ onSetup={editor => {
+ editorRef.current = editor;
}}
+ onEscape={cancelSending}
onArrowUp={() => {
- if (textValue.length === 0) {
+ if (messageContent.text.length === 0) {
editMessage(conversation.getLastEditableMessage());
}
}}
- getMentionCandidates={getMentionCandidates}
- replaceEmojis={shouldReplaceEmoji}
- placeholder={inputPlaceholder}
- onUpdate={setMessageContent}
- hasLocalEphemeralTimer={hasLocalEphemeralTimer}
- showFormatToolbar={formatToolbar.open}
- showMarkdownPreview={showMarkdownPreview}
- saveDraftState={saveDraft}
- loadDraftState={loadDraft}
onShiftTab={onShiftTab}
- onSend={handleSendMessage}
onBlur={() => isTypingRef.current && conversationRepository.sendTypingStop(conversation)}
+ onUpdate={setMessageContent}
+ onSend={sendMessage}
+ getMentionCandidates={getMentionCandidates}
+ saveDraftState={draftState.save}
+ loadDraftState={draftState.load}
+ replaceEmojis={shouldReplaceEmoji}
>
-
-
+
+
)}
>
)}
- {pastedFile && (
-
+ {fileHandling.pastedFile && (
+
)}