Remove downloadPolicy preference which does not work

This commit is contained in:
Ben Gotow 2018-04-02 17:15:31 -07:00
parent 116d71f548
commit 960696eb9b
2 changed files with 4 additions and 18 deletions

View file

@ -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,

View file

@ -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