support resending edit in context menu
This commit is contained in:
parent
1af8da4a4a
commit
6d458154a9
2 changed files with 16 additions and 0 deletions
|
@ -90,6 +90,11 @@ module.exports = React.createClass({
|
||||||
this.closeMenu();
|
this.closeMenu();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onResendEditClick: function() {
|
||||||
|
Resend.resend(this.props.mxEvent.replacingEvent());
|
||||||
|
this.closeMenu();
|
||||||
|
},
|
||||||
|
|
||||||
e2eInfoClicked: function() {
|
e2eInfoClicked: function() {
|
||||||
this.props.e2eInfoCallback();
|
this.props.e2eInfoCallback();
|
||||||
this.closeMenu();
|
this.closeMenu();
|
||||||
|
@ -220,6 +225,8 @@ module.exports = React.createClass({
|
||||||
render: function() {
|
render: function() {
|
||||||
const mxEvent = this.props.mxEvent;
|
const mxEvent = this.props.mxEvent;
|
||||||
const eventStatus = mxEvent.status;
|
const eventStatus = mxEvent.status;
|
||||||
|
const editEvent = mxEvent.replacingEvent();
|
||||||
|
const editStatus = editEvent && editEvent.status;
|
||||||
let resendButton;
|
let resendButton;
|
||||||
let redactButton;
|
let redactButton;
|
||||||
let cancelButton;
|
let cancelButton;
|
||||||
|
@ -242,6 +249,14 @@ module.exports = React.createClass({
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (editStatus === EventStatus.NOT_SENT) {
|
||||||
|
resendButton = (
|
||||||
|
<div className="mx_MessageContextMenu_field" onClick={this.onResendEditClick}>
|
||||||
|
{ _t('Resend edit') }
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (isSent && this.state.canRedact) {
|
if (isSent && this.state.canRedact) {
|
||||||
redactButton = (
|
redactButton = (
|
||||||
<div className="mx_MessageContextMenu_field" onClick={this.onRedactClick}>
|
<div className="mx_MessageContextMenu_field" onClick={this.onRedactClick}>
|
||||||
|
|
|
@ -1302,6 +1302,7 @@
|
||||||
"Unable to reject invite": "Unable to reject invite",
|
"Unable to reject invite": "Unable to reject invite",
|
||||||
"You cannot delete this message. (%(code)s)": "You cannot delete this message. (%(code)s)",
|
"You cannot delete this message. (%(code)s)": "You cannot delete this message. (%(code)s)",
|
||||||
"Resend": "Resend",
|
"Resend": "Resend",
|
||||||
|
"Resend edit": "Resend edit",
|
||||||
"Cancel Sending": "Cancel Sending",
|
"Cancel Sending": "Cancel Sending",
|
||||||
"Forward Message": "Forward Message",
|
"Forward Message": "Forward Message",
|
||||||
"Pin Message": "Pin Message",
|
"Pin Message": "Pin Message",
|
||||||
|
|
Loading…
Reference in a new issue