Skip to content

Commit 6baf405

Browse files
committed
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.
1 parent 02a2e06 commit 6baf405

2 files changed

Lines changed: 1 addition & 16 deletions

File tree

‎src/controllers/molecules/MessageTile.js‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,6 @@ module.exports = {
2929
return {
3030
resending: false
3131
};
32-
},
33-
34-
onResend: function() {
35-
var self = this;
36-
self.setState({
37-
resending: true
38-
});
39-
MatrixClientPeg.get().resendEvent(
40-
this.props.mxEvent, MatrixClientPeg.get().getRoom(
41-
this.props.mxEvent.getRoomId()
42-
)
43-
).finally(function() {
44-
self.setState({
45-
resending: false
46-
});
47-
})
4832
}
4933
};
5034

‎src/controllers/organisms/RoomView.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ module.exports = {
6767
switch (payload.action) {
6868
case 'message_send_failed':
6969
case 'message_sent':
70+
case 'message_resend_started':
7071
this.setState({
7172
room: MatrixClientPeg.get().getRoom(this.props.roomId)
7273
});

0 commit comments

Comments
 (0)