Allow quote-reply in thread view element-web (#6959)
This commit is contained in:
parent
d39002338d
commit
694ec946e2
11 changed files with 84 additions and 88 deletions
|
@ -63,7 +63,7 @@ const OptionsButton: React.FC<IOptionsButtonProps> =
|
|||
let contextMenu;
|
||||
if (menuDisplayed) {
|
||||
const tile = getTile && getTile();
|
||||
const replyThread = getReplyChain && getReplyChain();
|
||||
const replyChain = getReplyChain && getReplyChain();
|
||||
|
||||
const buttonRect = button.current.getBoundingClientRect();
|
||||
contextMenu = <MessageContextMenu
|
||||
|
@ -71,7 +71,7 @@ const OptionsButton: React.FC<IOptionsButtonProps> =
|
|||
mxEvent={mxEvent}
|
||||
permalinkCreator={permalinkCreator}
|
||||
eventTileOps={tile && tile.getEventTileOps ? tile.getEventTileOps() : undefined}
|
||||
collapseReplyChain={replyThread && replyThread.canCollapse() ? replyThread.collapse : undefined}
|
||||
collapseReplyChain={replyChain && replyChain.canCollapse() ? replyChain.collapse : undefined}
|
||||
onFinished={closeMenu}
|
||||
/>;
|
||||
}
|
||||
|
@ -191,6 +191,7 @@ export default class MessageActionBar extends React.PureComponent<IMessageAction
|
|||
dis.dispatch({
|
||||
action: 'reply_to_event',
|
||||
event: this.props.mxEvent,
|
||||
context: this.context.timelineRenderingType,
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -289,7 +290,7 @@ export default class MessageActionBar extends React.PureComponent<IMessageAction
|
|||
// Like the resend button, the react and reply buttons need to appear before the edit.
|
||||
// The only catch is we do the reply button first so that we can make sure the react
|
||||
// button is the very first button without having to do length checks for `splice()`.
|
||||
if (this.context.canReply && this.context.timelineRenderingType !== TimelineRenderingType.Thread) {
|
||||
if (this.context.canReply) {
|
||||
toolbarOpts.splice(0, 0, <>
|
||||
<RovingAccessibleTooltipButton
|
||||
className="mx_MessageActionBar_maskButton mx_MessageActionBar_replyButton"
|
||||
|
@ -297,7 +298,8 @@ export default class MessageActionBar extends React.PureComponent<IMessageAction
|
|||
onClick={this.onReplyClick}
|
||||
key="reply"
|
||||
/>
|
||||
{ SettingsStore.getValue("feature_thread") && (
|
||||
{ (SettingsStore.getValue("feature_thread")
|
||||
&& this.context.timelineRenderingType !== TimelineRenderingType.Thread) && (
|
||||
<RovingAccessibleTooltipButton
|
||||
className="mx_MessageActionBar_maskButton mx_MessageActionBar_threadButton"
|
||||
title={_t("Thread")}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue