mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
Remove duplicate display of network errors
Network errors render as a resend dialogue at the top of the message detail and need not be re-reported in the contact list or errors section. // FREEBIE
This commit is contained in:
@@ -12,7 +12,9 @@
|
||||
this.conflict = options.conflict;
|
||||
this.errors = _.reject(options.errors, function(e) {
|
||||
return (e.name === 'IncomingIdentityKeyError' ||
|
||||
e.name === 'OutgoingIdentityKeyError');
|
||||
e.name === 'OutgoingIdentityKeyError' ||
|
||||
e.name === 'OutgoingMessageError' ||
|
||||
e.name === 'SendMessageNetworkError');
|
||||
});
|
||||
|
||||
},
|
||||
@@ -125,15 +127,17 @@
|
||||
e.name === 'OutgoingMessageError' ||
|
||||
e.name === 'SendMessageNetworkError');
|
||||
});
|
||||
var hasConflict = false;
|
||||
if (this.model.hasKeyConflicts()) {
|
||||
hasConflict = i18n('newIdentity');
|
||||
var unknownErrors = this.errors['undefined'];
|
||||
if (unknownErrors) {
|
||||
unknownErrors = unknownErrors.filter(function(e) {
|
||||
return (e.name !== 'MessageError');
|
||||
});
|
||||
}
|
||||
this.$el.html(Mustache.render(_.result(this, 'template', ''), {
|
||||
sent_at : moment(this.model.get('sent_at')).toString(),
|
||||
received_at : this.model.isIncoming() ? moment(this.model.get('received_at')).toString() : null,
|
||||
tofrom : this.model.isIncoming() ? i18n('from') : i18n('to'),
|
||||
errors : this.errors['undefined'],
|
||||
errors : unknownErrors,
|
||||
title : i18n('messageDetail'),
|
||||
sent : i18n('sent'),
|
||||
received : i18n('received'),
|
||||
|
||||
Reference in New Issue
Block a user