Merge pull request #1 from NuSkooler/0.0.9-alpha

0.0.9 alpha
This commit is contained in:
Jasin2069 2018-03-14 22:46:52 -04:00 committed by GitHub
commit bfbdcd46c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 2 deletions

View File

@ -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]);
}

View File

@ -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',
}
*/
}
},

View File

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

View File

@ -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);
},