diff --git a/core/bbs_list.js b/core/bbs_list.js index 74c792c6..abff376f 100644 --- a/core/bbs_list.js +++ b/core/bbs_list.js @@ -99,6 +99,10 @@ exports.getModule = class BBSListModule extends MenuModule { self.displayAddScreen(cb); }, deleteBBS : function(formData, extraArgs, cb) { + if(!_.isNumber(self.selectedBBS) || 0 === self.entries.length) { + return cb(null); + } + const entriesView = self.viewControllers.view.getView(MciViewIds.view.BBSList); if(self.entries[self.selectedBBS].submitterUserId !== self.client.user.userId && !self.client.user.isSysOp()) { @@ -323,6 +327,7 @@ exports.getModule = class BBSListModule extends MenuModule { entriesView.setFocusItemIndex(self.selectedBBS); self.drawSelectedEntry(self.entries[self.selectedBBS]); } else if (self.entries.length > 0) { + self.selectedBBS = 0; entriesView.setFocusItemIndex(0); self.drawSelectedEntry(self.entries[0]); } diff --git a/core/config.js b/core/config.js index d153d4cb..7e5d92a1 100644 --- a/core/config.js +++ b/core/config.js @@ -740,10 +740,16 @@ function getDefaultConfig() { args : [ '24 hours' ] // items older than this will be removed }, + // + // Enable the following entry in your config.hjson to periodically create/update + // DESCRIPT.ION files for your file base + // + /* updateDescriptIonFiles : { schedule : 'on the last day of the week', action : '@method:core/file_base_list_export.js:updateFileBaseDescFilesScheduledEvent', } + */ } }, diff --git a/core/file_base_user_list_export.js b/core/file_base_user_list_export.js index 686833e5..2dba52ad 100644 --- a/core/file_base_user_list_export.js +++ b/core/file_base_user_list_export.js @@ -157,6 +157,8 @@ exports.getModule = class FileBaseListExport extends MenuModule { // this may take quite a while; temp disable of idle monitor self.client.stopIdleMonitor(); + self.client.on('key press', keyPressHandler); + const filterCriteria = Object.assign({}, self.config.filterCriteria); if(!filterCriteria.areaTag) { filterCriteria.areaTag = FileArea.getAvailableFileAreaTags(self.client); diff --git a/core/user_config.js b/core/user_config.js index 70e1f068..f60d2155 100644 --- a/core/user_config.js +++ b/core/user_config.js @@ -174,9 +174,9 @@ exports.getModule = class UserConfigModule extends MenuModule { }; }), 'name'); - currentThemeIdIndex = _.findIndex(self.availThemeInfo, function cmp(ti) { + currentThemeIdIndex = Math.max(0, _.findIndex(self.availThemeInfo, function cmp(ti) { return ti.themeId === self.client.user.properties.theme_id; - }); + })); callback(null); },