Don't real-time interrupt while you interrupt... yo dawg.

This commit is contained in:
Bryan Ashby 2019-01-22 20:19:05 -07:00
parent 94609eef3c
commit b45cccaef7
1 changed files with 9 additions and 2 deletions

View File

@ -203,17 +203,24 @@ exports.MenuModule = class MenuModule extends PluginModule {
return cb(null, false); // don't eat up the item; queue for later return cb(null, false); // don't eat up the item; queue for later
} }
this.realTimeInterrupt = 'blocked';
// //
// Default impl: clear screen -> standard display -> reload menu // Default impl: clear screen -> standard display -> reload menu
// //
const done = (err, removeFromQueue) => {
this.realTimeInterrupt = 'allowed';
return cb(err, removeFromQueue);
};
this.client.interruptQueue.displayWithItem( this.client.interruptQueue.displayWithItem(
Object.assign({}, interruptItem, { cls : true }), Object.assign({}, interruptItem, { cls : true }),
err => { err => {
if(err) { if(err) {
return cb(err, false); return done(err, false);
} }
this.reload(err => { this.reload(err => {
return cb(err, err ? false : true); return done(err, err ? false : true);
}); });
}); });
} }