Style resend button as an inline link

For messages that failed to send due to network errors, this change
allows retrying them directly from the main conversation view rather
than only from the message detail view.

// FREEBIE
This commit is contained in:
lilia 2016-03-22 14:47:17 -07:00
parent c48484e04f
commit 3901bcb8df
7 changed files with 100 additions and 90 deletions

View file

@ -211,6 +211,14 @@
this.set({errors: errors});
},
hasNetworkError: function(number) {
var error = _.find(this.get('errors'), function(e) {
return (e.name === 'MessageError' ||
e.name === 'OutgoingMessageError' ||
e.name === 'SendMessageNetworkError');
});
return !!error;
},
removeOutgoingErrors: function(number) {
var errors = _.partition(this.get('errors'), function(e) {
return e.number === number &&