mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
Merge branch 'master' into addressbook
This commit is contained in:
commit
84c1fb5402
60 changed files with 574 additions and 629 deletions
|
|
@ -97,11 +97,8 @@ export class MessageModel extends AbstractModel {
|
|||
isImportant: () => MessagePriority.High === this.priority(),
|
||||
hasAttachments: () => this.attachments().hasVisible(),
|
||||
|
||||
isDeleted: () => this.flags().includes('\\deleted'),
|
||||
isUnseen: () => !this.flags().includes('\\seen') /* || this.flags().includes('\\unseen')*/,
|
||||
isUnseen: () => !this.flags().includes('\\seen'),
|
||||
isFlagged: () => this.flags().includes('\\flagged'),
|
||||
isAnswered: () => this.flags().includes('\\answered'),
|
||||
isForwarded: () => this.flags().includes('$forwarded'),
|
||||
isReadReceipt: () => this.flags().includes('$mdnsent')
|
||||
// isJunk: () => this.flags().includes('$junk') && !this.flags().includes('$nonjunk'),
|
||||
// isPhishing: () => this.flags().includes('$phishing')
|
||||
|
|
@ -291,13 +288,9 @@ export class MessageModel extends AbstractModel {
|
|||
let classes = [];
|
||||
forEachObjectEntry({
|
||||
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.attachments().length,
|
||||
|
|
@ -306,9 +299,18 @@ export class MessageModel extends AbstractModel {
|
|||
hasUnseenSubMessage: this.hasUnseenSubMessage(),
|
||||
hasFlaggedSubMessage: this.hasFlaggedSubMessage()
|
||||
}, (key, value) => value && classes.push(key));
|
||||
this.flags().forEach(value => classes.push('flag-'+value));
|
||||
return classes.join(' ');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* https://datatracker.ietf.org/doc/html/rfc5788
|
||||
*/
|
||||
keywords() {
|
||||
return this.flags().filter(value => '\\' !== value[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
|
|
@ -567,19 +569,4 @@ export class MessageModel extends AbstractModel {
|
|||
return result.html || plainToHtml(this.plain());
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
flagHash() {
|
||||
return [
|
||||
this.deleted(),
|
||||
this.isDeleted(),
|
||||
this.isUnseen(),
|
||||
this.isFlagged(),
|
||||
this.isAnswered(),
|
||||
this.isForwarded(),
|
||||
this.isReadReceipt()
|
||||
].join(',');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue