New message state: Partially sent

This commit is contained in:
Josh Perez 2020-08-06 21:22:52 -04:00 committed by GitHub
parent 81cb7730a5
commit 6a68b37c83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 185 additions and 38 deletions

View file

@ -688,7 +688,13 @@
return this.get('type') === 'incoming';
},
getMessagePropStatus() {
const sent = this.get('sent');
const sentTo = this.get('sent_to') || [];
if (this.hasErrors()) {
if (sent || sentTo.length > 0) {
return 'partial-sent';
}
return 'error';
}
if (!this.isOutgoing()) {
@ -704,8 +710,6 @@
if (delivered || deliveredTo.length > 0) {
return 'delivered';
}
const sent = this.get('sent');
const sentTo = this.get('sent_to') || [];
if (sent || sentTo.length > 0) {
return 'sent';
}