mirror of https://github.com/vector-im/riot-web
Remove the 'resending' state which was duplicating a property of the event itself for no obvious reason. Remove onResend whose purpose was mostly to manage that state (and really should have been 'onResendClicked'). Listen for action to see when a message is resent.
parent
02a2e06d52
commit
6baf405a05
|
@ -29,22 +29,6 @@ module.exports = {
|
|||
return {
|
||||
resending: false
|
||||
};
|
||||
},
|
||||
|
||||
onResend: function() {
|
||||
var self = this;
|
||||
self.setState({
|
||||
resending: true
|
||||
});
|
||||
MatrixClientPeg.get().resendEvent(
|
||||
this.props.mxEvent, MatrixClientPeg.get().getRoom(
|
||||
this.props.mxEvent.getRoomId()
|
||||
)
|
||||
).finally(function() {
|
||||
self.setState({
|
||||
resending: false
|
||||
});
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -67,6 +67,7 @@ module.exports = {
|
|||
switch (payload.action) {
|
||||
case 'message_send_failed':
|
||||
case 'message_sent':
|
||||
case 'message_resend_started':
|
||||
this.setState({
|
||||
room: MatrixClientPeg.get().getRoom(this.props.roomId)
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue