mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
Added addComputables() to *Model
This commit is contained in:
parent
22f606ea75
commit
b165a1de4f
6 changed files with 221 additions and 223 deletions
|
|
@ -71,16 +71,15 @@ class MessageModel extends AbstractModel {
|
|||
hasFlaggedSubMessage: false
|
||||
});
|
||||
|
||||
this.attachmentIconClass = ko.computed(() =>
|
||||
File.getCombinedIconClass(this.hasAttachments() ? this.attachmentsSpecData() : [])
|
||||
);
|
||||
|
||||
this.attachments = ko.observableArray(new AttachmentCollectionModel);
|
||||
this.attachmentsSpecData = ko.observableArray([]);
|
||||
this.threads = ko.observableArray([]);
|
||||
|
||||
this.threadsLen = ko.computed(() => this.threads().length);
|
||||
this.isImportant = ko.computed(() => MessagePriority.High === this.priority());
|
||||
this.addComputables({
|
||||
attachmentIconClass: () => File.getCombinedIconClass(this.hasAttachments() ? this.attachmentsSpecData() : []),
|
||||
threadsLen: () => this.threads().length,
|
||||
isImportant: () => MessagePriority.High === this.priority(),
|
||||
});
|
||||
}
|
||||
|
||||
_reset() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue