mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Bugfix: message threaded mode was broken (knockout computable requires call to observable)
This commit is contained in:
parent
dade7756f8
commit
e2d6528bf5
2 changed files with 4 additions and 5 deletions
|
|
@ -86,7 +86,7 @@ export class MessageModel extends AbstractModel {
|
||||||
|
|
||||||
this.addComputables({
|
this.addComputables({
|
||||||
attachmentIconClass: () => FileInfo.getCombinedIconClass(this.hasAttachments() ? this.attachmentsSpecData() : []),
|
attachmentIconClass: () => FileInfo.getCombinedIconClass(this.hasAttachments() ? this.attachmentsSpecData() : []),
|
||||||
threadsLen: () => this.threads.length,
|
threadsLen: () => this.threads().length,
|
||||||
isImportant: () => MessagePriority.High === this.priority(),
|
isImportant: () => MessagePriority.High === this.priority(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -247,7 +247,6 @@ class ComposePopupView extends AbstractViewPopup {
|
||||||
},
|
},
|
||||||
|
|
||||||
attachmentsInProcess: () => this.attachments.filter(item => item && !item.complete()),
|
attachmentsInProcess: () => this.attachments.filter(item => item && !item.complete()),
|
||||||
attachmentsInReady: () => this.attachments.filter(item => item && item.complete()),
|
|
||||||
attachmentsInError: () => this.attachments.filter(item => item && item.error()),
|
attachmentsInError: () => this.attachments.filter(item => item && item.error()),
|
||||||
|
|
||||||
attachmentsCount: () => this.attachments.length,
|
attachmentsCount: () => this.attachments.length,
|
||||||
|
|
@ -1318,8 +1317,8 @@ class ComposePopupView extends AbstractViewPopup {
|
||||||
*/
|
*/
|
||||||
prepearAttachmentsForSendOrSave() {
|
prepearAttachmentsForSendOrSave() {
|
||||||
const result = {};
|
const result = {};
|
||||||
this.attachmentsInReady().forEach(item => {
|
this.attachments.forEach(item => {
|
||||||
if (item && item.tempName() && item.enabled()) {
|
if (item && item.complete() && item.tempName() && item.enabled()) {
|
||||||
result[item.tempName()] = [item.fileName(), item.isInline ? '1' : '0', item.CID, item.contentLocation];
|
result[item.tempName()] = [item.fileName(), item.isInline ? '1' : '0', item.CID, item.contentLocation];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -1417,7 +1416,7 @@ class ComposePopupView extends AbstractViewPopup {
|
||||||
isEmptyForm(includeAttachmentInProgress = true) {
|
isEmptyForm(includeAttachmentInProgress = true) {
|
||||||
const withoutAttachment = includeAttachmentInProgress
|
const withoutAttachment = includeAttachmentInProgress
|
||||||
? !this.attachments.length
|
? !this.attachments.length
|
||||||
: !this.attachmentsInReady().length;
|
: !this.attachments.some(item => item && item.complete());
|
||||||
|
|
||||||
return (
|
return (
|
||||||
!this.to.length &&
|
!this.to.length &&
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue