Upgrade i18n() to use Object.entries()

And replace quoted object keys to be without quotes
This commit is contained in:
djmaze
2021-03-24 21:26:40 +01:00
parent fe4dbc729c
commit 7eaaa0a793
24 changed files with 224 additions and 231 deletions

View File

@@ -272,22 +272,22 @@ export class MessageModel extends AbstractModel {
lineAsCss() {
let classes = [];
Object.entries({
'deleted': this.deleted(),
deleted: this.deleted(),
'deleted-mark': this.isDeleted(),
'selected': this.selected(),
'checked': this.checked(),
'flagged': this.isFlagged(),
'unseen': this.isUnseen(),
'answered': this.isAnswered(),
'forwarded': this.isForwarded(),
'focused': this.focused(),
'important': this.isImportant(),
'withAttachments': this.hasAttachments(),
'new': this.newForAnimation(),
'emptySubject': !this.subject(),
// 'hasChildrenMessage': 1 < this.threadsLen(),
'hasUnseenSubMessage': this.hasUnseenSubMessage(),
'hasFlaggedSubMessage': this.hasFlaggedSubMessage()
selected: this.selected(),
checked: this.checked(),
flagged: this.isFlagged(),
unseen: this.isUnseen(),
answered: this.isAnswered(),
forwarded: this.isForwarded(),
focused: this.focused(),
important: this.isImportant(),
withAttachments: this.hasAttachments(),
new: this.newForAnimation(),
emptySubject: !this.subject(),
// hasChildrenMessage: 1 < this.threadsLen(),
hasUnseenSubMessage: this.hasUnseenSubMessage(),
hasFlaggedSubMessage: this.hasFlaggedSubMessage()
}).forEach(([key, value]) => value && classes.push(key));
return classes.join(' ');
}