diff --git a/src/components/views/messages/MessageActionBar.tsx b/src/components/views/messages/MessageActionBar.tsx index d3d4d5a693..06817b910a 100644 --- a/src/components/views/messages/MessageActionBar.tsx +++ b/src/components/views/messages/MessageActionBar.tsx @@ -128,6 +128,11 @@ const ReactButton: React.FC = ({ mxEvent, reactions, onFocusC ; }; +export enum ActionBarRenderingContext { + Room, + Thread +} + interface IMessageActionBarProps { mxEvent: MatrixEvent; reactions?: Relations; @@ -137,7 +142,7 @@ interface IMessageActionBarProps { permalinkCreator?: RoomPermalinkCreator; onFocusChange?: (menuDisplayed: boolean) => void; toggleThreadExpanded: () => void; - isInThreadTimeline?: boolean; + renderingContext?: ActionBarRenderingContext; isQuoteExpanded?: boolean; } @@ -146,7 +151,7 @@ export default class MessageActionBar extends React.PureComponent { } } - const isInThreadTimeline = this.props.tileShape === TileShape.Thread; + const renderingContext = this.props.tileShape === TileShape.Thread + ? ActionBarRenderingContext.Thread + : ActionBarRenderingContext.Room; const actionBar = !isEditing ? { getTile={this.getTile} getReplyThread={this.getReplyThread} onFocusChange={this.onActionBarFocusChange} - isInThreadTimeline={isInThreadTimeline} + renderingContext={renderingContext} + isQuoteExpanded={isQuoteExpanded} toggleThreadExpanded={() => this.setQuoteExpanded(!isQuoteExpanded)} /> : undefined;