feat: Integrate forum layout support across various components and enhance room handling logic
This commit is contained in:
@@ -132,9 +132,10 @@ interface RoomInputProps {
|
||||
room: Room;
|
||||
/** When provided, all messages are sent as replies in this thread. */
|
||||
threadRootId?: string;
|
||||
onMessageSent?: () => void;
|
||||
}
|
||||
export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
|
||||
({ editor, fileDropContainerRef, roomId, room, threadRootId }, ref) => {
|
||||
({ editor, fileDropContainerRef, roomId, room, threadRootId, onMessageSent }, ref) => {
|
||||
const mx = useMatrixClient();
|
||||
const useAuthentication = useMediaAuthentication();
|
||||
const [enterForNewline] = useSetting(settingsAtom, 'enterForNewline');
|
||||
@@ -480,7 +481,8 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
|
||||
setReplyDraft(undefined);
|
||||
setCommandHint(undefined);
|
||||
sendTypingStatus(false);
|
||||
}, [mx, roomId, threadRootId, editor, replyDraft, sendTypingStatus, setReplyDraft, isMarkdown, commands, autoConvertEmoticons]);
|
||||
onMessageSent?.();
|
||||
}, [mx, roomId, threadRootId, editor, replyDraft, sendTypingStatus, setReplyDraft, isMarkdown, commands, autoConvertEmoticons, onMessageSent]);
|
||||
|
||||
const handleKeyDown: KeyboardEventHandler = useCallback(
|
||||
(evt) => {
|
||||
|
||||
Reference in New Issue
Block a user