mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Also show inline images as attachments
This commit is contained in:
parent
7f63a1e82d
commit
da451ed369
4 changed files with 5 additions and 11 deletions
|
|
@ -20,13 +20,6 @@ export class AttachmentCollectionModel extends AbstractCollectionModel
|
|||
*/
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {boolean}
|
||||
*/
|
||||
hasVisible() {
|
||||
return !!this.filter(item => !item.isLinked()).length;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} cid
|
||||
* @returns {*}
|
||||
|
|
|
|||
|
|
@ -150,7 +150,8 @@ export class MessageModel extends AbstractModel {
|
|||
this.addComputables({
|
||||
attachmentIconClass: () => FileInfo.getAttachmentsIconClass(this.attachments()),
|
||||
threadsLen: () => this.threads().length,
|
||||
hasAttachments: () => this.attachments().hasVisible(),
|
||||
// hasAttachments: () => this.attachments().filter(item => !item.isLinked()).length,
|
||||
hasAttachments: () => this.attachments().length,
|
||||
|
||||
isUnseen: () => !this.flags().includes('\\seen'),
|
||||
isFlagged: () => this.flags().includes('\\flagged'),
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ export class MailMessageView extends AbstractViewRight {
|
|||
|
||||
downloadAsZipAllowed: () => this.attachmentsActions.includes('zip')
|
||||
&& (currentMessage()?.attachments || [])
|
||||
.filter(item => item?.download && !item?.isLinked() && item?.checked())
|
||||
.filter(item => item?.download /*&& !item?.isLinked()*/ && item?.checked())
|
||||
.length,
|
||||
|
||||
tagsAllowed: () => FolderUserStore.currentFolder() ? FolderUserStore.currentFolder().tagsAllowed() : false,
|
||||
|
|
@ -467,7 +467,7 @@ export class MailMessageView extends AbstractViewRight {
|
|||
|
||||
downloadAsZip() {
|
||||
const hashes = (currentMessage() ? currentMessage().attachments : [])
|
||||
.map(item => item?.checked() && !item?.isLinked() ? item.download : '')
|
||||
.map(item => item?.checked() /*&& !item?.isLinked()*/ ? item.download : '')
|
||||
.filter(v => v);
|
||||
if (hashes.length) {
|
||||
Remote.post('AttachmentsActions', this.downloadAsZipLoading, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue