From 8479091d330aa21b934cec37ad1ce4766b491842 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 26 Sep 2017 10:42:53 -0600 Subject: [PATCH] Filter out system areas --- mods/file_area_list.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mods/file_area_list.js b/mods/file_area_list.js index 64a663cb..4937eb49 100644 --- a/mods/file_area_list.js +++ b/mods/file_area_list.js @@ -675,7 +675,13 @@ exports.getModule = class FileAreaList extends MenuModule { loadFileIds(force, cb) { if(force || (_.isUndefined(this.fileList) || _.isUndefined(this.fileListPosition))) { this.fileListPosition = 0; - FileEntry.findFiles(this.filterCriteria, (err, fileIds) => { + + const filterCriteria = Object.assign({}, this.filterCriteria); + if(!filterCriteria.areaTag) { + filterCriteria.areaTag = FileArea.getAvailableFileAreaTags(this.client); + } + + FileEntry.findFiles(filterCriteria, (err, fileIds) => { this.fileList = fileIds; return cb(err); });