UNPKG

matrix-react-sdk

Version:
54 lines (53 loc) 2.07 kB
import React from "react"; import { MatrixEvent } from "matrix-js-sdk/src/matrix"; import type { Relations } from "matrix-js-sdk/src/matrix"; import RoomContext from "../../../contexts/RoomContext"; import { RoomPermalinkCreator } from "../../../utils/permalinks/Permalinks"; import ReplyChain from "../elements/ReplyChain"; import { GetRelationsForEvent, IEventTileType } from "../rooms/EventTile"; interface IMessageActionBarProps { mxEvent: MatrixEvent; reactions?: Relations | null | undefined; getTile: () => IEventTileType | null; getReplyChain: () => ReplyChain | null; permalinkCreator?: RoomPermalinkCreator; onFocusChange?: (menuDisplayed: boolean) => void; toggleThreadExpanded: () => void; isQuoteExpanded?: boolean; getRelationsForEvent?: GetRelationsForEvent; } export default class MessageActionBar extends React.PureComponent<IMessageActionBarProps> { static contextType: React.Context<import("../../structures/RoomView.tsx").IRoomState & { threadId?: string; }>; context: React.ContextType<typeof RoomContext>; componentDidMount(): void; componentWillUnmount(): void; private onDecrypted; private onBeforeRedaction; private onRoomEvent; private onSent; private onFocusChange; private onReplyClick; private onEditClick; private readonly forbiddenThreadHeadMsgType; private get showReplyInThreadAction(); /** * Runs a given fn on the set of possible events to test. The first event * that passes the checkFn will have fn executed on it. Both functions take * a MatrixEvent object. If no particular conditions are needed, checkFn can * be null/undefined. If no functions pass the checkFn, no action will be * taken. * @param {Function} fn The execution function. * @param {Function} checkFn The test function. */ private runActionOnFailedEv; private onResendClick; private onCancelClick; /** * Pin or unpin the event. */ private onPinClick; render(): React.ReactNode; } export {};