From b45cccaef711a29651671cd1337b8c8fb7275ff9 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Tue, 22 Jan 2019 20:19:05 -0700 Subject: [PATCH] Don't real-time interrupt while you interrupt... yo dawg. --- core/menu_module.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/core/menu_module.js b/core/menu_module.js index 15e7ebce..52784042 100644 --- a/core/menu_module.js +++ b/core/menu_module.js @@ -203,17 +203,24 @@ exports.MenuModule = class MenuModule extends PluginModule { return cb(null, false); // don't eat up the item; queue for later } + this.realTimeInterrupt = 'blocked'; + // // Default impl: clear screen -> standard display -> reload menu // + const done = (err, removeFromQueue) => { + this.realTimeInterrupt = 'allowed'; + return cb(err, removeFromQueue); + }; + this.client.interruptQueue.displayWithItem( Object.assign({}, interruptItem, { cls : true }), err => { if(err) { - return cb(err, false); + return done(err, false); } this.reload(err => { - return cb(err, err ? false : true); + return done(err, err ? false : true); }); }); }