You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Restore access to message quote option on first click
This repairs access to the "Quote" option of the message context menu by passing down a getter so that we always access the most recent tile and reply thread instances. This ensures the context menu uses the newest information about the current event when determining menu options to show. Fixes https://github.com/vector-im/riot-web/issues/9639
This commit is contained in:
@ -30,8 +30,8 @@ export default class MessageActionBar extends React.PureComponent {
|
||||
static propTypes = {
|
||||
mxEvent: PropTypes.object.isRequired,
|
||||
permalinkCreator: PropTypes.object,
|
||||
tile: PropTypes.element,
|
||||
replyThread: PropTypes.element,
|
||||
getTile: PropTypes.func,
|
||||
getReplyThread: PropTypes.func,
|
||||
onFocusChange: PropTypes.func,
|
||||
};
|
||||
|
||||
@ -99,7 +99,9 @@ export default class MessageActionBar extends React.PureComponent {
|
||||
const x = buttonRect.right + window.pageXOffset;
|
||||
const y = (buttonRect.top + (buttonRect.height / 2) + window.pageYOffset) - 19;
|
||||
|
||||
const {tile, replyThread} = this.props;
|
||||
const { getTile, getReplyThread } = this.props;
|
||||
const tile = getTile && getTile();
|
||||
const replyThread = getReplyThread && getReplyThread();
|
||||
|
||||
let e2eInfoCallback = null;
|
||||
if (this.props.mxEvent.isEncrypted()) {
|
||||
|
Reference in New Issue
Block a user