From 960696eb9bfc4ec74940e9f26c77d6e2a1303f77 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Mon, 2 Apr 2018 17:15:31 -0700 Subject: [PATCH] Remove downloadPolicy preference which does not work --- app/src/config-schema.es6 | 7 ------- app/src/flux/stores/message-store.es6 | 15 ++++----------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/app/src/config-schema.es6 b/app/src/config-schema.es6 index 5e2a187d7..3b8ffdfc8 100644 --- a/app/src/config-schema.es6 +++ b/app/src/config-schema.es6 @@ -70,13 +70,6 @@ export default { attachments: { type: 'object', properties: { - downloadPolicy: { - type: 'string', - default: 'on-read', - enum: ['on-read', 'manually'], - enumLabels: ['When Read', 'Manually'], - title: 'Download attachments for new mail', - }, openFolderAfterDownload: { type: 'boolean', default: false, diff --git a/app/src/flux/stores/message-store.es6 b/app/src/flux/stores/message-store.es6 index 1e1a43fca..ac8e182c4 100644 --- a/app/src/flux/stores/message-store.es6 +++ b/app/src/flux/stores/message-store.es6 @@ -307,17 +307,10 @@ class MessageStore extends MailspringStore { } _fetchExpandedAttachments(items) { - const policy = AppEnv.config.get('core.attachments.downloadPolicy'); - if (policy === 'manually') return; - - return (() => { - const result = []; - for (let item of items) { - if (!this._itemsExpanded[item.id]) continue; - result.push(item.files.map(file => Actions.fetchFile(file))); - } - return result; - })(); + for (let item of items) { + if (!this._itemsExpanded[item.id]) continue; + item.files.map(file => Actions.fetchFile(file)); + } } // Expand all unread messages, all drafts, and the last message