mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-10 15:08:28 +03:00
Simplify message .priorityHigh
This commit is contained in:
parent
a3a4a057e5
commit
7dc4b283b3
5 changed files with 19 additions and 12 deletions
|
|
@ -156,7 +156,6 @@ export class MessageModel extends AbstractModel {
|
|||
this.addComputables({
|
||||
attachmentIconClass: () => FileInfo.getAttachmentsIconClass(this.attachments()),
|
||||
threadsLen: () => this.threads().length,
|
||||
isImportant: () => MessagePriority.High === this.priority(),
|
||||
hasAttachments: () => this.attachments().hasVisible(),
|
||||
|
||||
isUnseen: () => !this.flags().includes('\\seen'),
|
||||
|
|
@ -370,7 +369,7 @@ export class MessageModel extends AbstractModel {
|
|||
/**
|
||||
* @return string
|
||||
*/
|
||||
lineAsCss() {
|
||||
lineAsCss(flags=1) {
|
||||
let classes = [];
|
||||
forEachObjectEntry({
|
||||
deleted: this.deleted(),
|
||||
|
|
@ -378,13 +377,13 @@ export class MessageModel extends AbstractModel {
|
|||
checked: this.checked(),
|
||||
unseen: this.isUnseen(),
|
||||
focused: this.focused(),
|
||||
important: this.isImportant(),
|
||||
priorityHigh: this.priority() === MessagePriority.High,
|
||||
withAttachments: !!this.attachments().length,
|
||||
// hasChildrenMessage: 1 < this.threadsLen(),
|
||||
hasUnseenSubMessage: this.hasUnseenSubMessage(),
|
||||
hasFlaggedSubMessage: this.hasFlaggedSubMessage()
|
||||
}, (key, value) => value && classes.push(key));
|
||||
this.flags().forEach(value => classes.push('msgflag-'+value));
|
||||
flags && this.flags().forEach(value => classes.push('msgflag-'+value));
|
||||
return classes.join(' ');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue