Allow sieve filter to "fileinto" INBOX

This commit is contained in:
Martin Stenröse 2017-08-14 14:51:10 +02:00
parent 0f6b70f63e
commit 070e4ee0fb
3 changed files with 7 additions and 1 deletions

View file

@ -2,6 +2,8 @@
import ko from 'ko';
import _ from '_';
import {settingsGet} from 'Storage/Settings';
import {FolderType} from 'Common/Enums';
import {UNUSED_OPTION_VALUE} from 'Common/Consts';
import {isArray, folderListOptionsBuilder} from 'Common/Utils';
@ -35,6 +37,8 @@ class FolderUserStore
this.currentFolder = ko.observable(null).extend({toggleSubscribeProperty: [this, 'selected']});
this.sieveAllowFileintoInbox = !!settingsGet('SieveAllowFileintoInbox');
this.computers();
this.subscribers();
}
@ -117,7 +121,7 @@ class FolderUserStore
this.folderMenuForFilters = ko.computed(
() => folderListOptionsBuilder(
this.folderListSystem(), this.folderList(),
['INBOX'], [['', '']], null, null, null, (item) => (item ? item.localName() : ''))
[(this.sieveAllowFileintoInbox ? '' : 'INBOX')], [['', '']], null, null, null, (item) => (item ? item.localName() : ''))
);
}