diff --git a/src/js/messaging.js b/src/js/messaging.js index 6397ce3..7f0e80c 100644 --- a/src/js/messaging.js +++ b/src/js/messaging.js @@ -97,6 +97,10 @@ function onMessage(request, sender, callback) { µm.reloadHostsFiles(); break; + case 'reloadRecipeFiles': + µm.loadRecipes(true); + break; + case 'setMatrixSwitch': µm.tMatrix.setSwitch(request.switchName, '*', request.state); if ( µm.pMatrix.setSwitch(request.switchName, '*', request.state) ) { diff --git a/src/js/recipe-manager.js b/src/js/recipe-manager.js index f34cb31..e7813da 100644 --- a/src/js/recipe-manager.js +++ b/src/js/recipe-manager.js @@ -175,12 +175,12 @@ if ( parts.length < 3 ) { continue; } let f2 = parts[2]; let action = tMatrix.evaluateCellZXY(f0, f1, f2); - if ( action === 1 ) { + if ( (action & 3) === 1 ) { tMatrix.whitelistCell(f0, f1, f2); } if ( details.commit !== true ) { continue; } action = pMatrix.evaluateCellZXY(f0, f1, f2); - if ( action === 1 ) { + if ( (action & 3) === 1 ) { pMatrix.whitelistCell(f0, f1, f2); mustPersist = true; } diff --git a/src/js/storage.js b/src/js/storage.js index 3787589..43e7609 100644 --- a/src/js/storage.js +++ b/src/js/storage.js @@ -705,7 +705,6 @@ ); if ( recipesChanged ) { µm.recipeManager.reset(); - µm.loadRecipes(true); } if ( typeof callback === 'function' ) { callback({